<?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 Permission error when trying add user to group in ArcGIS Online Questions</title>
    <link>https://community.esri.com/t5/arcgis-online-questions/permission-error-when-trying-add-user-to-group/m-p/1104890#M42439</link>
    <description>&lt;P&gt;In my ArcGIS Online organization, we are trying to run this Python script to reassign ownership of groups and items to another user in the organization: &lt;A href="https://support.esri.com/en/technical-article/000021363" target="_self"&gt;Automate ownership reassignment of ArcGIS Online items shared to groups with the Update capability.&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I'm running into issue in this segment of the script:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;# 3. Change ownership of the old user groups to a new user.
usergroups = olduser.groups
for group in usergroups:
  grp = gis.groups.get(group['id'])
  if (grp.owner == orig_userid):
    grp.reassign_to(new_userid)
  else:
    grp.add_users(new_userid)
    grp.remove_users(orig_userid)&lt;/LI-CODE&gt;&lt;P&gt;Even though I have administrator access, the script fails on this line:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;grp.add_users(new_userid)&lt;/LI-CODE&gt;&lt;P&gt;The error states:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;Exception: You do not have permissions to access this resource or perform this operation.
(Error Code: 403)&lt;/LI-CODE&gt;&lt;P&gt;Does anyone know why the script is throwing this error? Thanks for any help you can provide!&lt;/P&gt;&lt;P&gt;Andy&lt;/P&gt;</description>
    <pubDate>Tue, 05 Oct 2021 16:59:20 GMT</pubDate>
    <dc:creator>Andy_Siegel</dc:creator>
    <dc:date>2021-10-05T16:59:20Z</dc:date>
    <item>
      <title>Permission error when trying add user to group</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/permission-error-when-trying-add-user-to-group/m-p/1104890#M42439</link>
      <description>&lt;P&gt;In my ArcGIS Online organization, we are trying to run this Python script to reassign ownership of groups and items to another user in the organization: &lt;A href="https://support.esri.com/en/technical-article/000021363" target="_self"&gt;Automate ownership reassignment of ArcGIS Online items shared to groups with the Update capability.&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I'm running into issue in this segment of the script:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;# 3. Change ownership of the old user groups to a new user.
usergroups = olduser.groups
for group in usergroups:
  grp = gis.groups.get(group['id'])
  if (grp.owner == orig_userid):
    grp.reassign_to(new_userid)
  else:
    grp.add_users(new_userid)
    grp.remove_users(orig_userid)&lt;/LI-CODE&gt;&lt;P&gt;Even though I have administrator access, the script fails on this line:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;grp.add_users(new_userid)&lt;/LI-CODE&gt;&lt;P&gt;The error states:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;Exception: You do not have permissions to access this resource or perform this operation.
(Error Code: 403)&lt;/LI-CODE&gt;&lt;P&gt;Does anyone know why the script is throwing this error? Thanks for any help you can provide!&lt;/P&gt;&lt;P&gt;Andy&lt;/P&gt;</description>
      <pubDate>Tue, 05 Oct 2021 16:59:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/permission-error-when-trying-add-user-to-group/m-p/1104890#M42439</guid>
      <dc:creator>Andy_Siegel</dc:creator>
      <dc:date>2021-10-05T16:59:20Z</dc:date>
    </item>
  </channel>
</rss>

