[Code Snippet] How to a create user in arcgis portal with a custom role?
Create a user or add member in ArcGIS portal with a custom role - 1. Get all custom roles from the portal, I presumed that the portal already has custom roles other than (org_user, org_publisher, org_admin) from arcgis.gis import * gis= GIS(portalUrl, userName, password) allRoles = gis.users.roles.all(max_roles=50) 2. Create a User with Default Role username="test" password='' firstname='test_name' lastname='test_last' email='test@test.com' description = 'Test Account' role = 'org_publisher' provider = 'enterprise' idp_username = 'test' level = 2 thumbnail = None newUser = gis.users.create(username, password,firstname, lastname, email, description, role, provider, idp_username, level, thumbnail) 3. Update the defualt role to Custom Role - Assign the role object not role name #Assigning the first role out of many portal roles, as an examp...