from arcgis.gis import *
self.portalInfo = GIS(self.portalUrl, self.userName, self.password)
self.portalUsers = self.portalInfo.users.search('')
users = self.portalUsers
roleManager = arcgis.gis.RoleManager(self.portalInfo)
roles = roleManager.all()
for user in users:
if hasattr(user,'roleId'):
for role in roles:
if(user.roleId == role.role_id):
print(user.username,user.role,role.name)
0 comments :
Post a Comment