<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Monitor ArcGIS Online License Allocations via API? in ArcGIS API for Python Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-python-questions/monitor-arcgis-online-license-allocations-via-api/m-p/1348189#M9275</link>
    <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/86309"&gt;@EarlMedina&lt;/a&gt;&amp;nbsp;- thanks for your response, I had a feeling I was fundamentally misunderstanding how to apply it!&lt;/P&gt;&lt;P&gt;Having got it to work I can see this is really useful for add-on licences, such as ArcGIS Pro. I can't see User Types in it however. I perhaps incorrectly&amp;nbsp;assumed 'Viewer/Editor/Creator' were a form of 'licence' and that plot would display total allocation vs seats occupied for the user types - as that is a bit of a pain to check manually. This doesn't look to be the case however. Do you know if that available via a different method?&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
    <pubDate>Fri, 10 Nov 2023 13:11:49 GMT</pubDate>
    <dc:creator>TimF</dc:creator>
    <dc:date>2023-11-10T13:11:49Z</dc:date>
    <item>
      <title>Monitor ArcGIS Online License Allocations via API?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/monitor-arcgis-online-license-allocations-via-api/m-p/1345782#M9239</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I'm trying to draft an ArcGIS Python API script that can monitor the license allocations for our ArcGIS Online organisation.&lt;/P&gt;&lt;P&gt;According to the &lt;A href="https://developers.arcgis.com/python/api-reference/arcgis.gis.admin.html#license" target="_blank" rel="noopener"&gt;documentation&lt;/A&gt; there should be a 'plot' function that returns this information, but I can't figure out the syntax to get it to work.&lt;/P&gt;&lt;P&gt;For example, the following works:&lt;/P&gt;&lt;LI-CODE lang="c"&gt;lm = gis.admin.license.all()
print(lm)&lt;/LI-CODE&gt;&lt;P&gt;But this doesn't:&lt;/P&gt;&lt;LI-CODE lang="c"&gt;lm = gis.admin.license.plot()
print(lm)

AttributeError: 'LicenseManager' object has no attribute 'plot'&lt;/LI-CODE&gt;&lt;P&gt;I don't entirely understand the guidance, as there aren't any code snippets... where am I going wrong?&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Fri, 03 Nov 2023 20:11:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/monitor-arcgis-online-license-allocations-via-api/m-p/1345782#M9239</guid>
      <dc:creator>TimF</dc:creator>
      <dc:date>2023-11-03T20:11:05Z</dc:date>
    </item>
    <item>
      <title>Re: Monitor ArcGIS Online License Allocations via API?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/monitor-arcgis-online-license-allocations-via-api/m-p/1346348#M9245</link>
      <description>&lt;P&gt;plot() is a method on a License, not LicenseManager. So, from your example you would just grab one of the licenses returned and plot from there:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;licenses = gis.admin.license.all()
licenses[0].plot()&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This would return something like this:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="EarlMedina_0-1699303675578.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/85149i5D7061F668AF4C64/image-size/medium?v=v2&amp;amp;px=400" role="button" title="EarlMedina_0-1699303675578.png" alt="EarlMedina_0-1699303675578.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Nov 2023 20:49:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/monitor-arcgis-online-license-allocations-via-api/m-p/1346348#M9245</guid>
      <dc:creator>EarlMedina</dc:creator>
      <dc:date>2023-11-06T20:49:59Z</dc:date>
    </item>
    <item>
      <title>Re: Monitor ArcGIS Online License Allocations via API?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/monitor-arcgis-online-license-allocations-via-api/m-p/1348189#M9275</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/86309"&gt;@EarlMedina&lt;/a&gt;&amp;nbsp;- thanks for your response, I had a feeling I was fundamentally misunderstanding how to apply it!&lt;/P&gt;&lt;P&gt;Having got it to work I can see this is really useful for add-on licences, such as ArcGIS Pro. I can't see User Types in it however. I perhaps incorrectly&amp;nbsp;assumed 'Viewer/Editor/Creator' were a form of 'licence' and that plot would display total allocation vs seats occupied for the user types - as that is a bit of a pain to check manually. This doesn't look to be the case however. Do you know if that available via a different method?&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Fri, 10 Nov 2023 13:11:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/monitor-arcgis-online-license-allocations-via-api/m-p/1348189#M9275</guid>
      <dc:creator>TimF</dc:creator>
      <dc:date>2023-11-10T13:11:49Z</dc:date>
    </item>
    <item>
      <title>Re: Monitor ArcGIS Online License Allocations via API?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/monitor-arcgis-online-license-allocations-via-api/m-p/1348689#M9280</link>
      <description>&lt;P&gt;I don't know of a specific method for this, but one way to do it would be to&amp;nbsp;&lt;A href="https://developers.arcgis.com/python/guide/accessing-and-managing-users/#searching-for-user-accounts" target="_self"&gt;run a user search&amp;nbsp;&lt;/A&gt;and then get the &lt;FONT face="courier new,courier"&gt;userLicenseTypeId&lt;/FONT&gt; (this was formerly&amp;nbsp;&lt;SPAN&gt;&lt;FONT face="courier new,courier"&gt;userType &lt;/FONT&gt;so try both if you run into unexpected results in your version) value for each User object.&amp;nbsp;The &lt;FONT face="courier new,courier"&gt;userLicenseTypeId&lt;/FONT&gt; &lt;/SPAN&gt;values correspond to the userLicenseTypeId values described in REST API documentation:&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;&lt;SPAN&gt;creatorUT | editorUT | GISProfessionalAdvUT | GISProfessionalBasicUT | GISProfessionalStdUT | viewerUT | fieldWorkerUT&lt;/SPAN&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;From there, you should have the data necessary to create your own plot/table. It's been a long while since I've had to do anything with Users/Content, but something like this should get you started:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;import pandas as pd
from arcgis.gis import GIS

gis = GIS("https://machine.domain.com/portal", "username", "password")
users = gis.users.search('*',  max_users=1000)
df = pd.DataFrame(users)
df.userLicenseTypeId.value_counts().plot(kind='bar', title="User Type Plot")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For simplicity, I use the user search results directly here, but ideally you would just grab the things you actually need from the User objects (if you don't, you may notice a performance hit especially with larger results). For example:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;users = [{"username": user.username, "userLicenseTypeId": user.userLicenseTypeId } for user in gis.users.search('*',  max_users=1000)]&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Anyhow, this should yield a plot like this one:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="EarlMedina_0-1699888439668.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/85772i07A9A6BE4B0A8621/image-size/medium?v=v2&amp;amp;px=400" role="button" title="EarlMedina_0-1699888439668.png" alt="EarlMedina_0-1699888439668.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 13 Nov 2023 15:36:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/monitor-arcgis-online-license-allocations-via-api/m-p/1348689#M9280</guid>
      <dc:creator>EarlMedina</dc:creator>
      <dc:date>2023-11-13T15:36:01Z</dc:date>
    </item>
    <item>
      <title>Re: Monitor ArcGIS Online License Allocations via API?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/monitor-arcgis-online-license-allocations-via-api/m-p/1351410#M9313</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/86309"&gt;@EarlMedina&lt;/a&gt;&amp;nbsp;- thanks very much for this, that's really useful!&lt;/P&gt;</description>
      <pubDate>Mon, 20 Nov 2023 12:26:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/monitor-arcgis-online-license-allocations-via-api/m-p/1351410#M9313</guid>
      <dc:creator>TimF</dc:creator>
      <dc:date>2023-11-20T12:26:48Z</dc:date>
    </item>
    <item>
      <title>Re: Monitor ArcGIS Online License Allocations via API?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/monitor-arcgis-online-license-allocations-via-api/m-p/1367035#M9483</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/86309"&gt;@EarlMedina&lt;/a&gt;&amp;nbsp;Is this possible to get the info for enterprise portal users?&amp;nbsp; I tested it for our AGOL users and it worked great, but not for the portal users.&lt;/P&gt;&lt;P&gt;I'm getting an empty list. Below is the post I ran into.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/t5/arcgis-api-for-python-questions/granting-licenses-to-new-users-gis-license-all/td-p/1167117" target="_blank"&gt;https://community.esri.com/t5/arcgis-api-for-python-questions/granting-licenses-to-new-users-gis-license-all/td-p/1167117&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Jan 2024 22:34:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/monitor-arcgis-online-license-allocations-via-api/m-p/1367035#M9483</guid>
      <dc:creator>YukoOliver</dc:creator>
      <dc:date>2024-01-05T22:34:31Z</dc:date>
    </item>
    <item>
      <title>Re: Monitor ArcGIS Online License Allocations via API?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/monitor-arcgis-online-license-allocations-via-api/m-p/1687462#M11867</link>
      <description>&lt;P&gt;Did you ever figure this out? Seeing the same thing, works in ArcGIS Online but not with an Enterprise Portal (11.5). Just get an empty list. Have tried grabbing bundles too, same deal.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 27 Feb 2026 20:54:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/monitor-arcgis-online-license-allocations-via-api/m-p/1687462#M11867</guid>
      <dc:creator>AaronKoelker</dc:creator>
      <dc:date>2026-02-27T20:54:43Z</dc:date>
    </item>
  </channel>
</rss>

