Summary
Updates the portal owner of a dataset to another user.
Certain datasets in an enterprise geodatabase store the active portal user account as the owner of the dataset, in addition to the data owner. The owner is determined based on the active portal user when the dataset is created. This ownership is stored in the metadata of the dataset and used to control access for administrative tasks on the dataset. In a utility network, this is the portal utility network owner.
If the existing portal dataset owner leaves the organization, the portal owner must be changed to another user. This user should possess the same user type and privilege as the original owner.
Usage
The connected ArcGIS Enterprise portal account must be the portal owner of the dataset or a portal administrator.
The Input Dataset must be a utility network dataset or layer.
The Input Dataset must be from a database connection established as the data owner.
The Target User must exist in the organization. If the user does not exist, it must be created as a new portal account.
Updating the portal owner of a dataset requires an exclusive lock. Any active connections locking the dataset (including services) must be closed.
Syntax
arcpy.management.UpdatePortalDatasetOwner(in_dataset, target_owner)
Parameter | Explanation | Data Type |
in_dataset | The input dataset that will have the portal owner updated. | Utility Network; Utility Network Layer |
target_owner | The name of the portal user that will be the new portal owner of the dataset. | String |
Derived Output
Name | Explanation | Data Type |
updated_dataset | The input dataset with the updated portal owner. | Utility Network Layer |
Code sample
Update the portal owner of the dataset to an existing portal user named 'gisadmin'.
import arcpy
arcpy.UpdatePortalDatasetOwner_management(
r"C:\MyProject\February\MyDatabase.sde\database.USER1.Electric\database.USER1.ElectricUN",
'gisadmin')
Environments
Licensing information
- Basic: No
- Standard: Yes
- Advanced: Yes