Select to view content in your preferred language

Switch active portal with arcpy

662
0
09-18-2023 11:31 AM
Status: Open
Labels (1)
GT_UTCO
New Contributor II

Currently there is no way to switch active portals in using ArcPy from what I can see in the current functions:

GT_UTCO_0-1695058378369.png

The workaround would be to us the SignInToPortal function, but this requires providing a username and password. This is not ideal since that information has to be stored somehow. It also seems unnecessary since once a user is signed into a portal in ArcGIS Pro, it will keep the connection for a long time even if the user switches to another portal. The user can then manually switch around to different portals without having to sign-in again. Of course every so often the user has to re-authenticate with the portal account manually in Pro. 

This becomes more powerful since in the arcgis api it is possible to connect to portal via Pro but it is dependent on the currently active portal. It even works when Pro isn't open. So there is potential to run scripts without having to store usernames and passwords for portal functions. Of course there is the trade-off of having to manage the portal sign-ins have a good status. 

Tags (3)