I am doing reporting on our user types on ArcGIS Online. Recently AGOL changed user types from level 1 & level 2 to Creator, Editor, Viewer, etc as per screenshot below.
I can't find the right object (or property of an object) in ArcGIS API for Python to get these user types programically
All I get is our custom roles, levels (which are 1, 2 and 11 and nothing else) and user types (org_admin, org_publisher and org_users) which don't match the new user types. Has anyone worked out how to do it?
My current code is something like that:
for user in gis.users.search(max_users=500):
name = user.username
role = user.role
ulevel = user.level
firstname = user.firstName
lastname = user.lastName
last_login = user.lastLogin
if hasattr(user, 'roleId'):
for role in roles:
if(user.roleId == role.role_id):
role_name = role.name
role_name = "undefined"
diff_name = gis.users.get(name)