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?
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()