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
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.
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.
Not the exact issue but putting this related problem out there into the void: I'm working with an Enterprise Portal v11.5 and when I check gis.admin.license.all() as an admin I get nothing returned, even though there are individually assigned licenses for ArcGIS Pro within the org. Anyone else have this issue? The code works fine for AGO portals and the documentation says it should work the same for Enterprise.
EDIT: Found the answer: it was a bug in version 2.4.2 of the API (ArcGIS Pro 3.6.x). It was fixed in version 2.4.3, so updating ArcGIS Pro to version 3.7.x should fix it.