How to Update Portal Sharing Settings in Python

2530
12
02-04-2021 09:19 AM
LeviCecil
Occasional Contributor III

I have a script that updates geocoders every month and publishes them to our enterprise portal. When this happens I have to manually change the sharing settings to "everyone" for it to be accessible in our public school finder. If I forget to to do this, I get emails saying that the app is asking users to log into the portal. Is there a way to set the sharing settings for a service in Python? 

0 Kudos
12 Replies
StuartHarvey
New Contributor II

This is just what I was after. Thanks Chris!!

Kayden75
New Contributor III

Hi Chris,

 

Can you explain your code a little bit? I am getting tripped up by the gis._con.token and the {0} in the url

 

Thanks!

Kayden

0 Kudos
LeviCecil
Occasional Contributor III

So I'm back to updating my geolocators regularly. None of the solutions in the thread have worked for me to automate changing the item sharing settings to public. Has this been addressed with the new geocoder tools in Pro 3?

0 Kudos