AnsweredAssumed Answered

Use Python To Sign in to ArcGIS Online and a Local Portal

Question asked by cgishack on Oct 2, 2014
Latest reply on Oct 6, 2014 by cgishack



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", "")

    # TO DO ->: Upload Map Package to



     arcpy.SignInToPortal_server("username","password", "")

    # TO DO->: Upload Map Package to Local Portal



Any ideas on how to change my portal URL programmatically?