Access a protected FeatureService with a Portal Token

09-06-2023 05:38 AM
New Contributor III

Hi there,

I got a question on how to provide a portal token wihtin a .mapx file, if its even possible.

The situation is as follow, there is a pro addin, which creates a .mapx (CIMMapDocument) and submits this to a custom GPService. This GPService then tries to export this .mapx with the common arcpy functionalities. The used feature service and the published gp service resides on the same arcgis server and the feature service is shared for the organization only. The problem is now that the GPService is missing the authentication/token to actually access the protected feature service. The export just flat out missing any features from the service.

I tried to manually edit the CIMStandardDataConnection WorkspaceConnectionString within the CIMMapDocument in order to provide the token to the GPService without any success:



 Does anyone have any idea on how to properly provide an access token within a .mapx or on how to access a protected feature service from a custom arcpy GPService? Or is there somewhere a documentation for the schema of a WorkspaceConnectionString ?

any help would be appreciated!

0 Kudos
0 Replies