<?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 Error when try to Clone Hub/Site to another organisation in ArcGIS API for Python Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-python-questions/error-when-try-to-clone-hub-site-to-another/m-p/1348162#M9273</link>
    <description>&lt;P&gt;I want to clone an ArcGIS Hub from an organisation to another with Python but i have an error.&lt;BR /&gt;I have try this :&lt;/P&gt;&lt;LI-CODE lang="python"&gt;source_Hub = source_gis.hub
target_hub = target_gis.hub
sud_patri = source_Hub.sites.get(id)
target_hub.sites.clone(sud_patri)&lt;/LI-CODE&gt;&lt;P&gt;Also i just try to create un new site with :&lt;/P&gt;&lt;LI-CODE lang="python"&gt;cloned_sudpatri = target_hub.sites.add(title=sud_patri.title)&lt;/LI-CODE&gt;&lt;P&gt;But I have the same error :&lt;/P&gt;&lt;LI-CODE lang="python"&gt;---------------------------------------------------------------------------
Exception                                 Traceback (most recent call last)
~\AppData\Local\Temp\ipykernel_17328\1956000436.py in &amp;lt;cell line: 1&amp;gt;()
----&amp;gt; 1 cloned_sudpatri = target_hub.sites.add(title=sud_patri.title)

e:\ArcGIS\conda\envs\arcpy3_gp\lib\site-packages\arcgis\apps\hub\sites.py in add(self, title, subdomain)
   1057 
   1058         # Register site and update its data
-&amp;gt; 1059         _data = self._create_and_register_site(
   1060             site, subdomain, _site_data, content_group_id, collab_group_id
   1061         )

e:\ArcGIS\conda\envs\arcpy3_gp\lib\site-packages\arcgis\apps\hub\sites.py in _create_and_register_site(self, site, subdomain, site_data, content_group_id, collab_group_id)
    697         if self._gis._portal.is_arcgisonline:
    698             # register site as an app
--&amp;gt; 699             _app_dict = site.register(app_type="browser", redirect_uris=[site.url])
    700             client_key = _app_dict["client_id"]
    701 

e:\ArcGIS\conda\envs\arcpy3_gp\lib\site-packages\arcgis\gis\__init__.py in register(self, app_type, redirect_uris, http_referers, privileges)
  16248             params["privileges"] = privileges
  16249         url = "%soauth2/registerApp" % self._portal.resturl
&amp;gt; 16250         res = self._portal.con.post(url, params)
  16251         self._hydrated = False
  16252         self._hydrate()
...
   1053 
   1054     def post_multipart(

Exception: Request signature does not match. The request has to be signed.
(Error Code: 400)&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;If someone have en idea or a valid method to clone a Hub/Site, i'm interrested.&lt;/P&gt;&lt;P&gt;Thank's&lt;/P&gt;</description>
    <pubDate>Fri, 10 Nov 2023 10:26:50 GMT</pubDate>
    <dc:creator>victorCanut</dc:creator>
    <dc:date>2023-11-10T10:26:50Z</dc:date>
    <item>
      <title>Error when try to Clone Hub/Site to another organisation</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/error-when-try-to-clone-hub-site-to-another/m-p/1348162#M9273</link>
      <description>&lt;P&gt;I want to clone an ArcGIS Hub from an organisation to another with Python but i have an error.&lt;BR /&gt;I have try this :&lt;/P&gt;&lt;LI-CODE lang="python"&gt;source_Hub = source_gis.hub
target_hub = target_gis.hub
sud_patri = source_Hub.sites.get(id)
target_hub.sites.clone(sud_patri)&lt;/LI-CODE&gt;&lt;P&gt;Also i just try to create un new site with :&lt;/P&gt;&lt;LI-CODE lang="python"&gt;cloned_sudpatri = target_hub.sites.add(title=sud_patri.title)&lt;/LI-CODE&gt;&lt;P&gt;But I have the same error :&lt;/P&gt;&lt;LI-CODE lang="python"&gt;---------------------------------------------------------------------------
Exception                                 Traceback (most recent call last)
~\AppData\Local\Temp\ipykernel_17328\1956000436.py in &amp;lt;cell line: 1&amp;gt;()
----&amp;gt; 1 cloned_sudpatri = target_hub.sites.add(title=sud_patri.title)

e:\ArcGIS\conda\envs\arcpy3_gp\lib\site-packages\arcgis\apps\hub\sites.py in add(self, title, subdomain)
   1057 
   1058         # Register site and update its data
-&amp;gt; 1059         _data = self._create_and_register_site(
   1060             site, subdomain, _site_data, content_group_id, collab_group_id
   1061         )

e:\ArcGIS\conda\envs\arcpy3_gp\lib\site-packages\arcgis\apps\hub\sites.py in _create_and_register_site(self, site, subdomain, site_data, content_group_id, collab_group_id)
    697         if self._gis._portal.is_arcgisonline:
    698             # register site as an app
--&amp;gt; 699             _app_dict = site.register(app_type="browser", redirect_uris=[site.url])
    700             client_key = _app_dict["client_id"]
    701 

e:\ArcGIS\conda\envs\arcpy3_gp\lib\site-packages\arcgis\gis\__init__.py in register(self, app_type, redirect_uris, http_referers, privileges)
  16248             params["privileges"] = privileges
  16249         url = "%soauth2/registerApp" % self._portal.resturl
&amp;gt; 16250         res = self._portal.con.post(url, params)
  16251         self._hydrated = False
  16252         self._hydrate()
...
   1053 
   1054     def post_multipart(

Exception: Request signature does not match. The request has to be signed.
(Error Code: 400)&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;If someone have en idea or a valid method to clone a Hub/Site, i'm interrested.&lt;/P&gt;&lt;P&gt;Thank's&lt;/P&gt;</description>
      <pubDate>Fri, 10 Nov 2023 10:26:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/error-when-try-to-clone-hub-site-to-another/m-p/1348162#M9273</guid>
      <dc:creator>victorCanut</dc:creator>
      <dc:date>2023-11-10T10:26:50Z</dc:date>
    </item>
    <item>
      <title>Re: Error when try to Clone Hub/Site to another organisation</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/error-when-try-to-clone-hub-site-to-another/m-p/1348218#M9276</link>
      <description>&lt;P&gt;I have resolve my error with specify active GIS.&lt;/P&gt;&lt;LI-CODE lang="python"&gt;from arcgis.env import active_gis
active_gis = target_gis&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Nov 2023 14:24:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/error-when-try-to-clone-hub-site-to-another/m-p/1348218#M9276</guid>
      <dc:creator>victorCanut</dc:creator>
      <dc:date>2023-11-10T14:24:38Z</dc:date>
    </item>
  </channel>
</rss>

