REST API update user level & role

669
1
Jump to solution
11-21-2017 07:01 AM
StuartMoore
Occasional Contributor III

I'm trying to update a set of users within our ArcGIS Online setup to be level 1 users and to assign a specific role.

i've create a python script that can change their name (below)

fsURL = "https://www.arcgis.com/sharing/rest/community/users/[userID]/update"
payload2 = {'firstName':'Test', 'f': 'json','token' : aToken}

but when i update it to change their level and role it doesn't work, well I get a success response

fsURL = "https://www.arcgis.com/sharing/rest/community/users/[userID]/update"
payload2 = {'level':'1','roleId': 'Rolexx', 'f': 'json','token' : aToken}

{"success":true,"username":"[userID]"}

Help?

Stuart

Tags (1)
0 Kudos
1 Solution

Accepted Solutions
StuartMoore
Occasional Contributor III
0 Kudos
1 Reply
StuartMoore
Occasional Contributor III
0 Kudos