Update Portal Dataset Owner (Data Management)


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.


  • 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.


UpdatePortalDatasetOwner(in_dataset, target_owner)
ParameterExplanationData Type

The input dataset that will have the portal owner updated.

Utility Network; Utility Network Layer

The name of the portal user that will be the new portal owner of the dataset.


Derived Output

NameExplanationData Type

The input dataset with the updated portal owner.

Utility Network Layer

Code sample

UpdatePortalDatasetOwner example (Python window)

Update the portal owner of the dataset to an existing portal user named 'gisadmin'.

import arcpy


Licensing information

  • Basic: No
  • Standard: Yes
  • Advanced: Yes

Related topics