<?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 Re: Updating group member roles through Python API in ArcGIS API for Python Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-python-questions/updating-group-member-roles-through-python-api/m-p/1624221#M11453</link>
    <description>&lt;P&gt;So is it possible to update an existing group member from 'users' to 'admins'?&lt;BR /&gt;Or do I have to remove the user from the group and add the user as admin?&lt;/P&gt;</description>
    <pubDate>Tue, 17 Jun 2025 08:55:11 GMT</pubDate>
    <dc:creator>MarcelBeckmann</dc:creator>
    <dc:date>2025-06-17T08:55:11Z</dc:date>
    <item>
      <title>Updating group member roles through Python API</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/updating-group-member-roles-through-python-api/m-p/797933#M1930</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is there a way to add a user to a group as a group admin using the "add_users" function in the python API? I saw there is a way to&amp;nbsp;do this with&amp;nbsp;the role parameter in the "invite_users" function but not sure why there isn't the same parameter for "add_users." Would rather just invite the user instead of requiring them to accept an invitation...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also tried looking for a way to update group member roles through the python API and can't seem to find anything to elevate a group member from user to admin. Is this possible?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for any help you can provide!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Feb 2019 19:33:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/updating-group-member-roles-through-python-api/m-p/797933#M1930</guid>
      <dc:creator>JamesMacCarthy</dc:creator>
      <dc:date>2019-02-18T19:33:49Z</dc:date>
    </item>
    <item>
      <title>Re: Updating group member roles through Python API</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/updating-group-member-roles-through-python-api/m-p/797934#M1931</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a same problem in 10.7.1. There is no Python API to elevate user's role in a group.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am working on large script to migrate portal named users to SAML log-ins. ArcGIS API for Python does not seem to have every REST API covered. I ended up making REST calls in some places where&amp;nbsp;&lt;SPAN&gt;Python API&amp;nbsp;doesn't exist or returns error. Here is a code for updating users' role in a group to group admin.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;grp_user_role_url = &lt;SPAN style="color: #008000; font-weight: bold;"&gt;r"{}/sharing/rest/community/groups/{}/updateUsers"&lt;/SPAN&gt;.format(base_portal_url, group_obj.id)
params = {&lt;SPAN style="color: #008000; font-weight: bold;"&gt;'admins'&lt;/SPAN&gt;: user_obj.username,
          &lt;SPAN style="color: #008000; font-weight: bold;"&gt;'token'&lt;/SPAN&gt;: portal_token,
          &lt;SPAN style="color: #008000; font-weight: bold;"&gt;'f'&lt;/SPAN&gt;: &lt;SPAN style="color: #008000; font-weight: bold;"&gt;'json'&lt;/SPAN&gt;}
encoded_params = urlencode(params).encode()
request = Request(grp_user_role_url, encoded_params)
request.add_header(&lt;SPAN style="color: #008000; font-weight: bold;"&gt;'Referer'&lt;/SPAN&gt;, base_portal_url)
rest_upd_user = urlopen(request).read().decode()
json_response = json.loads(rest_upd_user)&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 09:13:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/updating-group-member-roles-through-python-api/m-p/797934#M1931</guid>
      <dc:creator>VishApte</dc:creator>
      <dc:date>2021-12-12T09:13:38Z</dc:date>
    </item>
    <item>
      <title>Re: Updating group member roles through Python API</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/updating-group-member-roles-through-python-api/m-p/1284355#M8643</link>
      <description>&lt;P&gt;According to the documentation at&amp;nbsp;&lt;A href="https://developers.arcgis.com/python/api-reference/arcgis.gis.toc.html#group" target="_blank" rel="noopener"&gt;arcgis.gis module | ArcGIS API for Python&lt;/A&gt;&amp;nbsp;this should be possible by using the keyword "admin":&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;group&lt;/SPAN&gt;&lt;SPAN class=""&gt;.&lt;/SPAN&gt;&lt;SPAN class=""&gt;add_users&lt;/SPAN&gt;&lt;SPAN class=""&gt;(&lt;/SPAN&gt;&lt;SPAN class=""&gt;usernames&lt;/SPAN&gt;&lt;SPAN class=""&gt;=&lt;/SPAN&gt;&lt;SPAN class=""&gt;[&lt;/SPAN&gt;&lt;SPAN class=""&gt;"User1234"&lt;/SPAN&gt;&lt;SPAN class=""&gt;,&lt;/SPAN&gt;&lt;SPAN class=""&gt;"User5678"&lt;/SPAN&gt;&lt;SPAN class=""&gt;],&lt;/SPAN&gt; &lt;SPAN class=""&gt;admin&lt;/SPAN&gt;&lt;SPAN class=""&gt;=&lt;/SPAN&gt;&lt;SPAN class=""&gt;"Admin9012"&lt;/SPAN&gt;&lt;SPAN class=""&gt;)&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But I haven't got this working.&lt;BR /&gt;I get the error message:&lt;/P&gt;&lt;P&gt;TypeError: add_users() got an unexpected keyword argument 'admin'&lt;/P&gt;&lt;P&gt;Maybe only working in Portal and not in ArcGIS Online?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 01 May 2023 15:01:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/updating-group-member-roles-through-python-api/m-p/1284355#M8643</guid>
      <dc:creator>jorisfrenkel</dc:creator>
      <dc:date>2023-05-01T15:01:23Z</dc:date>
    </item>
    <item>
      <title>Re: Updating group member roles through Python API</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/updating-group-member-roles-through-python-api/m-p/1286904#M8666</link>
      <description>&lt;P&gt;I found there is an error in the documentation and the keyword needs to be passed in as "admins" not "admin".&lt;/P&gt;</description>
      <pubDate>Mon, 08 May 2023 17:54:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/updating-group-member-roles-through-python-api/m-p/1286904#M8666</guid>
      <dc:creator>ShayneODonnell</dc:creator>
      <dc:date>2023-05-08T17:54:08Z</dc:date>
    </item>
    <item>
      <title>Re: Updating group member roles through Python API</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/updating-group-member-roles-through-python-api/m-p/1287290#M8672</link>
      <description>&lt;P&gt;It is working now for me in ArcGIS Online, but not in Pro. My Pro version is a bit older, so an older version of the API, maybe that's the problem. However, I have another issue (create a new user) that is not working in ArcGIS Online, but is working in Pro, so yeah, what should I use now...&lt;/P&gt;</description>
      <pubDate>Tue, 09 May 2023 15:27:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/updating-group-member-roles-through-python-api/m-p/1287290#M8672</guid>
      <dc:creator>jorisfrenkel</dc:creator>
      <dc:date>2023-05-09T15:27:54Z</dc:date>
    </item>
    <item>
      <title>Re: Updating group member roles through Python API</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/updating-group-member-roles-through-python-api/m-p/1624221#M11453</link>
      <description>&lt;P&gt;So is it possible to update an existing group member from 'users' to 'admins'?&lt;BR /&gt;Or do I have to remove the user from the group and add the user as admin?&lt;/P&gt;</description>
      <pubDate>Tue, 17 Jun 2025 08:55:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/updating-group-member-roles-through-python-api/m-p/1624221#M11453</guid>
      <dc:creator>MarcelBeckmann</dc:creator>
      <dc:date>2025-06-17T08:55:11Z</dc:date>
    </item>
  </channel>
</rss>

