Select to view content in your preferred language

Python API Not Returning Enterprise Licensing Information

413
2
05-05-2023 09:03 AM
mpboyle
Regular Contributor

When trying to get our Pro licensing information from our Enterprise, nothing (NoneType) is returned, even though the majority of our Pro licenses are configured to use our Enterprise accounts.

Is this a known limitation of Enterprise?  Is it due to our Enterprise version (10.9.1)?  Is it due to the arcgis module version (1.9.1)?

Below is the code I'm using, and based on the Python API documentation the way I read it, this should be doable in both ArcGIS Online and Enterprise.  I've tested the same code below on our AGO Organization and it works as expected.

 

import arcgis

portal_url = '...portal url...'
portal_user = '...user name...'
portal_pwd = '...user password...'

# connect to portal
p = arcgis.GIS(portal_url, portal_user, portal_pwd)

# get pro licensing
pro_licenses = p.admin.license.get('ArcGIS Pro')
print(pro_licenses)

# verify pro licensing is returned
if pro_licenses:
    a = pro_licenses.all()
    for u in a:
        print(u)

 

When I run the code above on our Enterprise, line 12 returns: None

0 Kudos
2 Replies
Brian_Wilson
Regular Contributor II

We use concurrent licensing not named user licensing. So all I ever get from using p.admin.license.all() is [].

I have to use the flexlm tools to read my concurrent license usage.

0 Kudos
mpboyle
Regular Contributor

This issue seemed to be our version of Pro/arcgis module.  We recently upgraded from Pro 2.9.5 to 3.1.1 (arcgis module version 2.1.0.2) and the script above is now returning our Pro licensing running on our Portal.