Hello,
I would like to use arcpy to share a map package (.mpk) in both ArcGIS Online and our local Portal.
I have been testing the SignInToPortal_server (username, password, portal_url) function but the 'portal_url' parameter seems meaningless (see bold text in the below documentation).
Docs for portal_url paramater
The Sign In To Portal tool reads the URL set in Desktop Administrator. Any user entered value is ignored. The default value is URL for the ArcGIS portal currently chosen by the user in Desktop Administrator.
Basically I would like to do the below but I can not get around the settings pre-stored in Desktop Administrator....
arcpy.SignInToPortal_server("username","password", "http://www.arcgis.com/")
# TO DO ->: Upload Map Package to ArcGIS.com
arcpy.SignOutFromPortal_server()
arcpy.SignInToPortal_server("username","password", "http://www.myLocalPortalURL.com/")
# TO DO->: Upload Map Package to Local Portal
arcpy.SignOutFromPortal_server()
Any ideas on how to change my portal URL programmatically?
Andrew