Cannot sign into portal via ArcPy

03-25-2021 06:25 AM
New Contributor

I am trying to export my utility network package via, however my initial error was:

arcgisscripting.ExecuteError: ERROR 002119: Must be connected and signed into the portal.
Failed to execute (UtilityNetworkToAssetPackage).

So I added a line before the utility network call to sign into my portal, and this error is now thrown:

ValueError: Error signing on to <myportal>.

Message : s
Details : Unable to generate token.

Anyone have any potential solutions for this kind of error?

Sample code is below:

import arcpy

arcpy.SignInToPortal(<portalurl>, <username>, <password>), '*', dest_path, file_name, 'INCLUDE_DATA')


0 Kudos
0 Replies