ERROR
Attempts to upload a service definition file from ArcGIS Pro to ArcGIS Enterprise or ArcGIS Online using the Upload Service Definition tool fail with the following error message returned:
Error: 002901: Sharing related error during geo-processing (Unable to check if service exists.

The error message is also returned when running the arcpy.server.UploadServiceDefinition or MapImageSharingDraft function in ArcPy.
The correct URL for the federated server can be found in the ArcGIS Enterprise portal by navigating to Organization > Settings > Servers under Administration URL. The URL format is as follows:
https://webadaptorhost.domain.com/webadaptorname/manager
For ArcPy functions, the portal URL, username and password must be entered as follows:
arcpy.SignInToPortal("https://www.portal.domain.com/webadaptor", "MyUserName", "MyPassword", verify_cert=False)
Note: The verify_cert parameter is inserted to bypass verification if a self-signed certificate is used. The parameter can be removed accordingly.
To reset login credentials for an account with a token generated or for the primary site administrator, refer to Portal for ArcGIS: Recovering the portal when no administrator accounts are available or Portal for ArcGIS: Reset password for instructions.
Article ID: 000029487
Get help from ArcGIS experts
Start chatting now