<?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: Scripting creation of Shared Update Group ArcGIS API for Python in ArcGIS API for Python Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-python-questions/scripting-creation-of-shared-update-group-arcgis/m-p/1653885#M11687</link>
    <description>&lt;P&gt;thank you! This worked!&lt;/P&gt;</description>
    <pubDate>Mon, 29 Sep 2025 15:23:07 GMT</pubDate>
    <dc:creator>carlyrobbins1</dc:creator>
    <dc:date>2025-09-29T15:23:07Z</dc:date>
    <item>
      <title>Scripting creation of Shared Update Group ArcGIS API for Python</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/scripting-creation-of-shared-update-group-arcgis/m-p/1653825#M11684</link>
      <description>&lt;P&gt;I am trying to script creating a shared update group using ArcGIS API for Python. I only want members from my organization to be able to join, and all members of the group can contribute content.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am able to create the group manually, but I am getting an error when I script it.&amp;nbsp;In my code, I am cloning an existing shared update group and renaming it, and this is the error.&lt;/P&gt;&lt;PRE&gt;Invalid membership access for group with update capabilities.
(Error Code: 400)&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is the code:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;from arcgis.gis import GIS
import arcgis
from IPython.display import display
print (arcgis.__version__)

#Define the source and target portals. They are both the same in our case. You should be signed into the organization's GeoPlatform when you run this script. You must have Publisher privileges to be able to create a new group.
source = GIS("home")
target = GIS("home")&lt;/LI-CODE&gt;&lt;LI-CODE lang="python"&gt;#search for the shared updated group to be cloned
source_shared_groups = source.groups.search("title: OCS NSD ER Dashboard Training (NOAA Internal Only) AND owner:ocs.nrb_noaa")
source_shared_groups&lt;/LI-CODE&gt;&lt;LI-CODE lang="python"&gt;source_shared_group = source_shared_groups[0]
source_shared_group&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;import tempfile

#Define new name for the cloned group. ****REPLACE "New Shared Group Name" with the name of your new group.****
new_shared_group_name = "New Shared Group Name (Internal Only)"

#Checks for the existence of the new group name. This prevents the "already exists" message from appearing. It will not overwrite a group that already exists with the same name as your new group name.
if not target.groups.search(new_shared_group_name):
    try:
        with tempfile.TemporaryDirectory() as temp_dir:
            shared_thumbnail_file = source_shared_group.download_thumbnail(temp_dir)

            # Create a group in the target portal with the new name
            target_shared_group = target.groups.create(title=new_shared_group_name,
                                                 tags=source_shared_group.tags,
                                                 description=source_shared_group.description,
                                                 snippet=source_shared_group.snippet,
                                                 access="private",
                                                 thumbnail=shared_thumbnail_file,
                                                 is_invitation_only=True,
                                                 sort_field='avgRating',
                                                 sort_order='asc',
                                                 is_view_only=False,
                                                 users_update_items = True)
            # Display the new group
            display(target_shared_group)

    except Exception as e:
        print('Group {} could not be created'.format(new_shared_group_name))
        print(e)
else:
    print('Group {} already exists in the portal'.format(new_shared_group_name))
    target_shared_group = target.groups.search(new_shared_group_name)[0]&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I say users_update_items = False, it creates the group but it is not a shared update group.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is this really a problem with my admin privileges if I can make the shared update group manually, or is there something wrong with the code?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Mon, 29 Sep 2025 12:40:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/scripting-creation-of-shared-update-group-arcgis/m-p/1653825#M11684</guid>
      <dc:creator>carlyrobbins1</dc:creator>
      <dc:date>2025-09-29T12:40:14Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting creation of Shared Update Group ArcGIS API for Python</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/scripting-creation-of-shared-update-group-arcgis/m-p/1653838#M11685</link>
      <description>&lt;P&gt;moved to the &lt;STRONG&gt;arcgis-api-for-python-questions&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 29 Sep 2025 13:19:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/scripting-creation-of-shared-update-group-arcgis/m-p/1653838#M11685</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2025-09-29T13:19:38Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting creation of Shared Update Group ArcGIS API for Python</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/scripting-creation-of-shared-update-group-arcgis/m-p/1653844#M11686</link>
      <description>&lt;P&gt;The default for membership_access is "none", which permits membership from any organization. That is not compatible with a Shared Update group (i.e., with users_update_items set to True), hence the error you are seeing.&amp;nbsp;&lt;/P&gt;&lt;P&gt;To address the issue, add the membership_access parameter to your call to create_group, explicitly setting it to "org" or "collaboration", as appropriate for your needs.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 29 Sep 2025 13:34:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/scripting-creation-of-shared-update-group-arcgis/m-p/1653844#M11686</guid>
      <dc:creator>PeterKnoop</dc:creator>
      <dc:date>2025-09-29T13:34:47Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting creation of Shared Update Group ArcGIS API for Python</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/scripting-creation-of-shared-update-group-arcgis/m-p/1653885#M11687</link>
      <description>&lt;P&gt;thank you! This worked!&lt;/P&gt;</description>
      <pubDate>Mon, 29 Sep 2025 15:23:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/scripting-creation-of-shared-update-group-arcgis/m-p/1653885#M11687</guid>
      <dc:creator>carlyrobbins1</dc:creator>
      <dc:date>2025-09-29T15:23:07Z</dc:date>
    </item>
  </channel>
</rss>

