Select to view content in your preferred language

Accessing secured map services via PrintTask

1215
2
01-30-2014 06:27 AM
ZachChristoff
Deactivated User
Background: We are building a JS API application that access services via Portal for ArcGIS.

We are having some issues accessing our secured services using the PrintTask. We have a federated setup (Portal for ArcGIS), but don't have the ability to access our service endpoints (w/ tokens) via the PrintTask.

Below is a JSON response captured in Fiddler.

{"error":
{"code":400,
"message":"Unable to complete operation.",
"details":["Error executing tool.: Layer \"GSS_EVENTS\": Unable to connect to map server at https://some.server/arcgis/rest/services/Maps/GSS_EVENTS/MapServer.
\nERROR: code:403, User does not have permissions to access 'maps/gss_events.mapserver'., Access to this resource is forbidden, regardless of authorization.
\nFailed to execute (Export Web Map).\nFailed to execute (Export Web Map Task)."]}}

Does the PrintTask support secured services (via Portal tokens)?
2 Replies
karenvolarich
Occasional Contributor
I am experiencing the same error with secured map services and using our ArcGIS server export web map task.

Results from fiddler are similar:

"error":{"code":400,"message":"Unable to complete operation.
details":["Error executing tool.: Layer \"....\": Unable to connect to map server at https://..../MapServer.\nFailed to execute (Export Web Map).\nFailed to execute (Export Web Map Task)."]}}
0 Kudos
ZachChristoff
Deactivated User
@kvolari

Is your Portal federated? Are you using windows authentication?

I resolved the issue by adding a user to our Portal site and giving them access to the map services. I made the assumption that the user needing access would be the end user, but that was false. It is actually the account used to setup ArcGIS Server. Also, make sure that account is >= publisher.

I was able to determine which user by identifying that a new account was being created in Portal each time I called the Print Task.

Good luck... This one took me days to figure out 🙂