HOW TO
By default, maps, layers, and other items added or published to Portal for ArcGIS are only accessible to the owner. The sharing level can be viewed by opening the services individually. However, this process can be automated using ArcGIS API for Python. Follow the workflow described in this article to identify the sharing levels of all the items of a specific owner in Portal for ArcGIS.
from arcgis.gis import GIS
gis = GIS('https://<machine>.<domain>.com:7443/arcgis', 'Username', 'Password', verify_cert=False) print ('Connected')
items = gis.content.search ('owner:<Owner_Name>', max_items=-1)
for file in items: print (file.title, file.shared_with)
The code block below demonstrates the full script.
from arcgis.gis import GIS gis = GIS('https://testdomain.esri.com:7443/arcgis', 'username', 'password', verify_cert=False) print('Connected') items = gis.content.search('owner:Owner123', max_items=-1) for i in items: print(i.title, i.shared_with)
Get help from ArcGIS experts
Download the Esri Support App