Hello all,
I am creating a script in my hub community on ArcGIS Online to quickly create a bunch of usernames quickly. I have most of it nailed down but each license is given a location sharing license for the Tracker functionality. With this I cannot seem to figure out how I can assign the created usernames location tracking licenses and add them to the tracker view. I have been trying to follow the documentation here https://developers.arcgis.com/python/latest/api-reference/arcgis.gis.admin.html#arcgis.gis.admin.License.assign as well as this https://developers.arcgis.com/python/latest/api-reference/arcgis.apps.tracker.html#locationtrackingmanager but so far I have not had any luck with any combination I try. Has anyone done this before and can help out?
Hi @AFackler_NAPSG,
Try the following:
from arcgis.gis import GIS # Variables agolAdmin = 'jskinner_rats' agolPassword = '*******' agolUser = 'fielduser' # Connect to AGOL print('Connecting to AGOL') gis = GIS('https://www.arcgis.com', agolAdmin, agolPassword) print("Assign Locating Sharing license") user_license = gis.admin.license.get('ArcGIS Location Sharing') ent = 'locsharing' user_license.assign(username=agolUser, entitlements=ent)
That did the trick perfectly, thanks Jake!
Aangemelde leden kunnen berichten plaatsen, updates volgen en meer. Nieuw hier? Registreer een gratis account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.