<?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: Revoke ArcGIS Urban Suite license in ArcGIS API for Python Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-python-questions/revoke-arcgis-urban-suite-license/m-p/1174148#M7405</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/132139"&gt;@Sven_Harpering&lt;/a&gt;&amp;nbsp;,&amp;nbsp;&lt;/P&gt;&lt;P&gt;admin.license.all() returns all the individual licenses in your org and from there you should be able to assign/revoke them. However, some app licenses (including ArcGIS Urban) are considered app bundle licenses. To query these licenses for your org, you can use&amp;nbsp;license.bundles function.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Below is a sample script that revokes all types of licenses from users on a list:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;#Import modules and functions
from arcgis.gis import GIS
from arcgis.gis.admin import AGOLAdminManager

#Sign in to portal as admin
gis = GIS(PORTAL_URL, ADMIN_USERNAME, ADMIN_PASSWORD)

#Define license manager and find org licenses and app bundles
org_licenses=gis.admin.license.all()
org_bundles=gis.admin.license.bundles

#Revoke licenses from a list of users
usernames=['USERNAME1','USERNAME2']
for username in usernames:
    for license in org_licenses:
        try:
            license.revoke(username=username, entitlements='*')
        except:
            pass
    print(f'All licenses for "{username}" were revoked!')

    for bundle in org_bundles:
        try:
            bundle.revoke(username)
        except:
            pass
    print(f'All app bundle licenses for "{username}" were revoked!')&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;MJ&lt;/P&gt;</description>
    <pubDate>Mon, 16 May 2022 13:15:26 GMT</pubDate>
    <dc:creator>MJBiazar</dc:creator>
    <dc:date>2022-05-16T13:15:26Z</dc:date>
    <item>
      <title>Revoke ArcGIS Urban Suite license</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/revoke-arcgis-urban-suite-license/m-p/1154858#M7243</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;does anyone have a clue how I can revoke an ArcGIS Urban Suite license via the ArcGIS API for Python? My Script works for ArcGIS Pro,&amp;nbsp; ArcGIS Insights, etc., but not for the ArcGIS Urban Suite. Here is my code...&lt;/P&gt;&lt;P&gt;First part: List all licenses from my Named User:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;for prov in currentUser.provisions:
    print(prov.title)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The result is:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;Classic Story Maps
ArcGIS QuickCapture Web Designer
ArcGIS Dashboards
ArcGIS Pro
ArcGIS for SharePoint
ArcGIS for Office
ArcGIS Hub
ArcGIS for Power BI
ArcGIS Collector
ArcGIS Insights
ArcGIS Survey123
ArcGIS Online
ArcGIS Online Web App
ArcGIS Urban
ArcGIS Drone2Map
ArcGIS Experience Builder
ArcGIS Workforce
ArcGIS Web AppBuilder
ArcGIS StoryMaps
ArcGIS Tracker
ArcGIS AppStudio
ArcGIS QuickCapture
ArcGIS Navigator
ArcGIS Dashboards
ArcGIS CityEngine
ArcGIS Runtime Standard&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As you can see, no ArcGIS Urban Suite is listed although my user has such a license. Afterwards I was checking which licenses are avaiable in the subscription:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;gis_verbindung.admin.license.all()&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The result here:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;[&amp;lt;ArcGIS Insights License at https://www.arcgis.com/sharing/rest/&amp;gt;,
 &amp;lt;ArcGIS Pro License at https://www.arcgis.com/sharing/rest/&amp;gt;,
 &amp;lt;ArcGIS Drone2Map License at https://www.arcgis.com/sharing/rest/&amp;gt;,
 &amp;lt;ArcGIS Image for ArcGIS Online License at https://www.arcgis.com/sharing/rest/&amp;gt;,
 &amp;lt;ArcGIS GeoBIM License at https://www.arcgis.com/sharing/rest/&amp;gt;,
 &amp;lt;ArcGIS for Power BI License at https://www.arcgis.com/sharing/rest/&amp;gt;,
 &amp;lt;ArcGIS GeoPlanner License at https://www.arcgis.com/sharing/rest/&amp;gt;,
 &amp;lt;License at https://www.arcgis.com/sharing/rest/&amp;gt;,
 &amp;lt;ArcGIS AppStudio License at https://www.arcgis.com/sharing/rest/&amp;gt;,
 &amp;lt;ArcGIS Drone2Map License at https://www.arcgis.com/sharing/rest/&amp;gt;,
 &amp;lt;ArcGIS Community Analyst License at https://www.arcgis.com/sharing/rest/&amp;gt;,
 &amp;lt;Runtime Analysis  License at https://www.arcgis.com/sharing/rest/&amp;gt;,
 &amp;lt;ArcGIS Navigator License at https://www.arcgis.com/sharing/rest/&amp;gt;,
 &amp;lt;Admin Tools for ArcGIS Online License at https://www.arcgis.com/sharing/rest/&amp;gt;,
 &amp;lt;ArcGIS Tracker License at https://www.arcgis.com/sharing/rest/&amp;gt;,
 &amp;lt;ArcGIS Business Analyst Web and Mobile Apps License at https://www.arcgis.com/sharing/rest/&amp;gt;,
 &amp;lt;ArcGIS CityEngine License at https://www.arcgis.com/sharing/rest/&amp;gt;]&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also here no ArcGIS Urban Suite. Normally I would now use this code to revoke a license:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;pro_license = gis_verbindung.admin.license.get('ArcGIS Urban')
pro_license.revoke(username=currentUser.username, entitlements="*")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It works for every license listed above, but how can I revoke an ArcGIS Urban Suite-license?&lt;/P&gt;&lt;P&gt;Any hint is appreciatet :).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best&lt;/P&gt;&lt;P&gt;Sven&lt;/P&gt;</description>
      <pubDate>Thu, 17 Mar 2022 16:00:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/revoke-arcgis-urban-suite-license/m-p/1154858#M7243</guid>
      <dc:creator>Sven_Harpering</dc:creator>
      <dc:date>2022-03-17T16:00:21Z</dc:date>
    </item>
    <item>
      <title>Re: Revoke ArcGIS Urban Suite license</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/revoke-arcgis-urban-suite-license/m-p/1174148#M7405</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/132139"&gt;@Sven_Harpering&lt;/a&gt;&amp;nbsp;,&amp;nbsp;&lt;/P&gt;&lt;P&gt;admin.license.all() returns all the individual licenses in your org and from there you should be able to assign/revoke them. However, some app licenses (including ArcGIS Urban) are considered app bundle licenses. To query these licenses for your org, you can use&amp;nbsp;license.bundles function.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Below is a sample script that revokes all types of licenses from users on a list:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;#Import modules and functions
from arcgis.gis import GIS
from arcgis.gis.admin import AGOLAdminManager

#Sign in to portal as admin
gis = GIS(PORTAL_URL, ADMIN_USERNAME, ADMIN_PASSWORD)

#Define license manager and find org licenses and app bundles
org_licenses=gis.admin.license.all()
org_bundles=gis.admin.license.bundles

#Revoke licenses from a list of users
usernames=['USERNAME1','USERNAME2']
for username in usernames:
    for license in org_licenses:
        try:
            license.revoke(username=username, entitlements='*')
        except:
            pass
    print(f'All licenses for "{username}" were revoked!')

    for bundle in org_bundles:
        try:
            bundle.revoke(username)
        except:
            pass
    print(f'All app bundle licenses for "{username}" were revoked!')&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;MJ&lt;/P&gt;</description>
      <pubDate>Mon, 16 May 2022 13:15:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/revoke-arcgis-urban-suite-license/m-p/1174148#M7405</guid>
      <dc:creator>MJBiazar</dc:creator>
      <dc:date>2022-05-16T13:15:26Z</dc:date>
    </item>
    <item>
      <title>Re: Revoke ArcGIS Urban Suite license</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/revoke-arcgis-urban-suite-license/m-p/1174450#M7409</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/133181"&gt;@MJBiazar&lt;/a&gt;, thank you! Works perfectly :).&lt;/P&gt;</description>
      <pubDate>Tue, 17 May 2022 06:21:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/revoke-arcgis-urban-suite-license/m-p/1174450#M7409</guid>
      <dc:creator>Sven_Harpering</dc:creator>
      <dc:date>2022-05-17T06:21:03Z</dc:date>
    </item>
    <item>
      <title>Re: Revoke ArcGIS Urban Suite license</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/revoke-arcgis-urban-suite-license/m-p/1174592#M7410</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/132139"&gt;@Sven_Harpering&lt;/a&gt;&amp;nbsp;Fantastic! I'm glad that it worked for you too.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 17 May 2022 15:05:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/revoke-arcgis-urban-suite-license/m-p/1174592#M7410</guid>
      <dc:creator>MJBiazar</dc:creator>
      <dc:date>2022-05-17T15:05:59Z</dc:date>
    </item>
  </channel>
</rss>

