Changing ownership of sites in ArcGIS Hub and ArcGIS Enterprise Sites

3899
0
07-29-2021 08:14 AM
KatelynThompson
Esri Contributor
2 0 3,899

If you use ArcGIS Hub or ArcGIS Enterprise Sites, you may have to change ownership of a site you own or someone else’s site in cases where responsibility changes hands. For a smooth transition of site content from one person to another, you can now use a simple Python script to automate this process.

Install the ArcGIS Hub Python API  

Hub’s Python API (`arcgishub`) allows you to automate several ArcGIS Hub workflows using simple Python scripts. To get started, check out the ArcGIS Hub Python Library. For installation, refer to the Steps to Install. These steps also work for installing it in a notebook instance of ArcGIS Notebooks. 

Run the script to automate ownership transfer 

The two-step process to reassign an initiative or site to a new user is as demonstrated below. You start by first fetching the initiative or site and then assigning it to a new user. Click on the below image to see this example guide. 

Before you get started, review the following: 

  1. Only the administrator of an organization has privileges to perform this task. 
  2. ` target_owner` must be the username of a user who belongs to the same organization. If you wish to add this initiative to another organization, you may clone it instead. 
  3. If you have sites created with ArcGIS Hub Basic or ArcGIS Enterprise, you can reassign them to another user using the same process with a slight change in the first step. You will fetch the site instead of initiative from the collection of sites (`myhub.sites.get(itemid)`). 

KatelynThompson_0-1627568069373.png

Manual workflow

To complete this process manually, follow these steps: 

  1. Sign in to ArcGIS Hub or ArcGIS Enterprise Sites as an administrator or site owner.  
  2. On the overview page, click Sites (or Initiatives if you’re using ArcGIS Hub Premium).  
  3. Open the site you want to transfer. 
  4. Ensure that the new owner is a member of the core team by clicking the site's second dropdown menu and choosing Teams 
  5. Open the site’s core team and click the add team members button to add the new site owner to the group.  KatelynThompson_1-1627568219599.png
  6. Next, open ArcGIS Online by clicking the more button and clicking Edit in ArcGIS Online. You will complete the remainder of the workflow in ArcGIS Online.KatelynThompson_3-1627568297659.png
  7. Ensure that the new owner has an ArcGIS account with your ArcGIS Online organization (or Enterprise Portal) and has at least the minimum privileges to create and manage sites or initiatives.  

    1. Click on the new owner’s name and choose View Profile.
    2. Click View Settings and Licenses and look for the role. KatelynThompson_6-1627569148340.png

       

    3. If you need to adjust the role, follow the steps provided in Assign a default role (for administrators) or Configure a custom role (initiative/site managers) if you don’t have this role set up yet.
  8. Un-share each item in the core team in ArcGIS Online. Items belonging to a Shared update group (groups that grant edit access to its members) cannot have their ownership changed until they are removed from the group. 
    1. Click the My Groups tab and open the core team group.  
    2. Click the item’s sharing icon. KatelynThompson_7-1627569275046.png
    3. Click Edit group sharing.KatelynThompson_8-1627569438556.pngd. Un-check the checkbox for the group and click OK.KatelynThompson_11-1627569803379.png
  9. Next, reassign item ownership to the new owner. This includes the Hub Site Application item and if you’re using ArcGIS Hub Premium, the Hub Initiative item. You cannot use the python script to reassign ownership of Survey123 items, but you can change their ownership manually in ArcGIS Online or ArcGIS Enterprise.  
    1. Click the sharing icon and choose View item detailsKatelynThompson_12-1627569866120.png
    2. On the item details page, click Change owner.KatelynThompson_16-1627569992481.png
    3. Select the new owner and click Save.
      KatelynThompson_19-1627570506851.png
  10. Share each item back to the core team group by clicking on the item’s sharing icon and clicking Edit group sharingNote: It isn’t necessary to change the ownership of items belonging to the content and followers group, unless you are the item owner and need to transfer responsibility to the new owner.  
  11. Repeat the process of removing items from the core team, re-assigning their ownership and sharing them back to the core team. 
  12. Once all items have been shared to the core team group, change the ownership of the core team group  to the new owner. 

    1. Click My Groups and select the group to open its group details page.
    2. Click Change owner and select the new owner. KatelynThompson_20-1627570730755.png
  13. Repeat the steps for reassigning group ownership for the content group and any additional groups added to the site using the groups manager. If you’re using ArcGIS Hub Premium, this includes reassigning ownership of the followers group.  

For more information, see the ArcGIS Hub documentation 

Related Python scripts 

  1. Cloning an initiative within the same organization 
  2. Cloning an initiative in another Hub organization 
  3. Cloning a site between ArcGIS Hub (Basic/Premium) and ArcGIS Enterprise 

 

Tags (1)
About the Author
Writer on the ArcGIS Hub team