I am trying to write a script that will get me the users, email, user name, User Type and Role
I can do the below but cant find the type for User Type and Role
Any thoughts on how to get their User Type and Role?
from arcgis.gis import GIS
import arcgis
import pandas as pd
agol_username = 'xyz'
agol_password = '\xyz'
output_csv = r'C:\Users\Desktop\projects\AGOL_Python\users.csv'
search_user = '*'
gis = GIS('https://xyz.maps.arcgis.com', agol_username, agol_password)
user_list = gis.users.search(query=search_user, max_users=2000)
output = []
for item in user_list:
email = item.email
username = item.username
z = [email] + (username if isinstance(username, list) else [username])
print(z)
output.append(z)
print("")
print(output)
df = pd.DataFrame(output,columns=['name','email'], dtype=float)
print(df)