<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic REST API update user level &amp; role in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/rest-api-update-user-level-role/m-p/672416#M52012</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i've create a python script that can change their name (below)&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;&lt;SPAN style="background-color: #f6f6f6;"&gt;&lt;SPAN&gt;fsURL = "&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Fwww.arcgis.com%2Fsharing%2Frest%2Fcommunity%2Fusers%2F" rel="nofollow" target="_blank"&gt;https://www.arcgis.com/sharing/rest/community/users/&lt;/A&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #ff0000;"&gt;&lt;EM&gt;[userID]&lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #f6f6f6;"&gt;/update"&lt;/SPAN&gt;&lt;BR style="background-color: #f6f6f6;" /&gt;&lt;SPAN style="background-color: #f6f6f6;"&gt;payload2 = {'firstName':'Test',&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="background-color: #f6f6f6;"&gt;'f': 'json','token' : aToken}&lt;/SPAN&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but when i update it to change their level and role it doesn't work, well I get a success response&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;&lt;SPAN&gt;fsURL = "&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Fwww.arcgis.com%2Fsharing%2Frest%2Fcommunity%2Fusers%2F" rel="nofollow" target="_blank"&gt;https://www.arcgis.com/sharing/rest/community/users/&lt;/A&gt;&lt;SPAN style="color: #ff0000;"&gt;&lt;EM&gt;[userID]&lt;/EM&gt;&lt;/SPAN&gt;/update"&lt;BR /&gt;payload2 = {'level':'1','roleId': '&lt;SPAN style="color: #ff0000;"&gt;&lt;EM&gt;Rolexx&lt;/EM&gt;&lt;/SPAN&gt;', 'f': 'json','token' : aToken}&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;{"success":true,"username":"&lt;EM style="color: #ff0000; background-color: #f6f6f6;"&gt;[userID]&lt;/EM&gt;"}&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Help?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Stuart&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 21 Nov 2017 15:01:56 GMT</pubDate>
    <dc:creator>StuartMoore</dc:creator>
    <dc:date>2017-11-21T15:01:56Z</dc:date>
    <item>
      <title>REST API update user level &amp; role</title>
      <link>https://community.esri.com/t5/python-questions/rest-api-update-user-level-role/m-p/672416#M52012</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i've create a python script that can change their name (below)&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;&lt;SPAN style="background-color: #f6f6f6;"&gt;&lt;SPAN&gt;fsURL = "&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Fwww.arcgis.com%2Fsharing%2Frest%2Fcommunity%2Fusers%2F" rel="nofollow" target="_blank"&gt;https://www.arcgis.com/sharing/rest/community/users/&lt;/A&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #ff0000;"&gt;&lt;EM&gt;[userID]&lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #f6f6f6;"&gt;/update"&lt;/SPAN&gt;&lt;BR style="background-color: #f6f6f6;" /&gt;&lt;SPAN style="background-color: #f6f6f6;"&gt;payload2 = {'firstName':'Test',&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="background-color: #f6f6f6;"&gt;'f': 'json','token' : aToken}&lt;/SPAN&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but when i update it to change their level and role it doesn't work, well I get a success response&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;&lt;SPAN&gt;fsURL = "&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Fwww.arcgis.com%2Fsharing%2Frest%2Fcommunity%2Fusers%2F" rel="nofollow" target="_blank"&gt;https://www.arcgis.com/sharing/rest/community/users/&lt;/A&gt;&lt;SPAN style="color: #ff0000;"&gt;&lt;EM&gt;[userID]&lt;/EM&gt;&lt;/SPAN&gt;/update"&lt;BR /&gt;payload2 = {'level':'1','roleId': '&lt;SPAN style="color: #ff0000;"&gt;&lt;EM&gt;Rolexx&lt;/EM&gt;&lt;/SPAN&gt;', 'f': 'json','token' : aToken}&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;{"success":true,"username":"&lt;EM style="color: #ff0000; background-color: #f6f6f6;"&gt;[userID]&lt;/EM&gt;"}&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Help?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Stuart&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Nov 2017 15:01:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/rest-api-update-user-level-role/m-p/672416#M52012</guid>
      <dc:creator>StuartMoore</dc:creator>
      <dc:date>2017-11-21T15:01:56Z</dc:date>
    </item>
    <item>
      <title>Re: REST API update user level &amp; role</title>
      <link>https://community.esri.com/t5/python-questions/rest-api-update-user-level-role/m-p/672417#M52013</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;after some searching i managed to resolve the issue, i wasn't using the correct URLs, this post helped:&amp;nbsp;&lt;A _jive_internal="true" href="https://community.esri.com/message/662616-is-there-a-way-to-change-users-from-level-2-to-level-1-in-bulk-rather-than-one-at-a-time"&gt;https://community.esri.com/message/662616-is-there-a-way-to-change-users-from-level-2-to-level-1-in-bulk-rather-than-one-at-a-time&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;here are the correct URLs&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;&lt;A class="unlinked"&gt;https://www.arcgis.com/sharing/rest/portals/self/updateUserLevel&lt;/A&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Fwww.arcgis.com%2Fsharing%2Frest%2Fportals%2Fself%2FupdateUserRole" rel="nofollow" target="_blank"&gt;https://www.arcgis.com/sharing/rest/portals/self/updateUserRole&lt;/A&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Stuart&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Nov 2017 10:15:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/rest-api-update-user-level-role/m-p/672417#M52013</guid>
      <dc:creator>StuartMoore</dc:creator>
      <dc:date>2017-11-22T10:15:55Z</dc:date>
    </item>
  </channel>
</rss>

