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:
URL=https://[service-url]/server/rest/services/[feature-service-name]/FeatureServer;TOKEN=806XOw-WtfaVkRUrMb7pTHFt1YKQ7DJ78Xg5C3esYz7RdtJ-3wDzewAki2vufSAxytVfM5_e6BVR24b6vw2UGLPzEY-eiDV_R90baO3RqhgTw83fJTwvVuDWa2k4jtJppXyCZBbgLf4U_wtmCnXz6Wh7djV6qjD5cUAEHArTs5f-E7Lx5HBC5ii9-FvPut5k
URL=https://[service-url]/server/rest/services/memaTest/FeatureServer?token=dus7xEuXji33lj--zmfPoQMlJyABGMmvCMaum_7yUkkVO_uqw2E02SKNryHpOO0p-0dVSkIxfTBCcwMUEH622Pq0UnpunNaET_8pwztJ_XdVkC8AsWAkVeMJ72ncUmyQtu1J7Hh-txDX_jTpsLa0KN99Btj1dTk1ep4bJjCr-Ws.
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!