How to find Level 1 users in Portal using ArcGIS API for Python

479
1
02-20-2018 10:14 AM
GeoffreyWest
Occasional Contributor III

I want to write a script where I can find and delete  all level 1 users  that have not been active in 90 days in Portal.  What is the method in the ArcGIS API for Python to find license level of users?

Tags (1)
0 Kudos
1 Reply
AaronPulver
Esri Regular Contributor

You could do something like:

gis = arcgis.gis.GIS(org, username, password)

users = gis.users.search(max_users=1000)

for user in users:

    print(user.level)

    # do_something()