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
Solved! Go to Solution.
after some searching i managed to resolve the issue, i wasn't using the correct URLs, this post helped: https://community.esri.com/message/662616-is-there-a-way-to-change-users-from-level-2-to-level-1-in-...
here are the correct URLs
https://www.arcgis.com/sharing/rest/portals/self/updateUserLevel
https://www.arcgis.com/sharing/rest/portals/self/updateUserRole
thanks
Stuart
after some searching i managed to resolve the issue, i wasn't using the correct URLs, this post helped: https://community.esri.com/message/662616-is-there-a-way-to-change-users-from-level-2-to-level-1-in-...
here are the correct URLs
https://www.arcgis.com/sharing/rest/portals/self/updateUserLevel
https://www.arcgis.com/sharing/rest/portals/self/updateUserRole
thanks
Stuart