Update Portal Dataset Owner (Data Management)

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 is used to control access for administrative tasks on the dataset.

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 following are examples of a portal dataset owner:

Usage

  • The connected ArcGIS Enterprise portal account must be the portal owner of the dataset or a portal administrator.

  • The Input Dataset value must be from a branch versioned workspace.

  • The Input Dataset value must be from a database connection established as the data owner.

  • The Input Dataset value must be a utility network dataset or layer.

  • The Target User value 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.

Parameters

LabelExplanationData Type
Input Dataset

The input dataset for which the portal owner will be updated.

Utility Network; Utility Network Layer; Trace Network; Trace Network Layer
Target Owner

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

String

Derived Output

LabelExplanationData Type
Updated Dataset

The input dataset with the updated portal owner.

Utility Network Layer; Trace Network Layer

arcpy.management.UpdatePortalDatasetOwner(in_dataset, target_owner)
NameExplanationData Type
in_dataset

The input dataset for which the portal owner will be updated.

Utility Network; Utility Network Layer; Trace Network; Trace Network Layer
target_owner

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

String

Derived Output

NameExplanationData Type
updated_dataset

The input dataset with the updated portal owner.

Utility Network Layer; Trace Network Layer

Code sample

UpdatePortalDatasetOwner example (Python window)

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

Related topics