I'm trying to export a list of Portal users and their user types. This is the code I'm trying to use but getting an error regarding the user.LicenseTypeId
entry:
import csv
from arcgis.gis import GIS
gis = GIS("https://test.esri.com:7443/arcgis", "username", "password", verify_cert=False)
outputFile = r"C:\Users\Desktop\test.csv"
users = gis.users.search('*', max_users=1000)
with open(outputFile, 'w', newline='') as ResultFile:
wr = csv.writer(ResultFile)
header = 'Username', 'Type', 'Email'
wr.writerow(header)
for user in users:
UserRow = user.username, user.LicenseTypeId, user.email
wr.writerow(UserRow)
user.licenseTypeId
in stead ofuser.LicenseTypeId
?