Custom print tool published to Enterprise 11.2 cannot print maps with secured map services

214
2
Jump to solution
4 weeks ago
ColForbin
Occasional Contributor

I have published a custom print service as a web tool to our 11.2 Enterprise deployment from ArcGIS Pro 3.2.2.  I added a print widget to a Web AppBuilder app and specified the endpoint for the web tool in the Service URL box of the web tool.  The widget prints successfully using my custom layouts, but only when there are public map services on the map, or hosted feature layers that I have access to.  When there are secured map services on the map, the tool fails with:

 

{
    "error": {
        "code": 400,
        "extendedCode": -2147467261,
        "message": "Unable to complete operation.",
        "details": [
            "Error executing tool. Export Web Map : Failed to create layer from service at https://myportalurl/arcgis/rest/services/FeatureServer/0.\nFailed to execute (Export Web Map)."
        ]
    }
}

 

 

So it seems the user that is running the print service (which is not my user) does not have permission to access the secured map services.  I am an admin in Portal and have access to these map services.

I remember this happening with a standalone ArcGIS server deployment and I solved it by publishing a tool with embedded credentials using the ImportCredentials function of arcpy. But that did not work in this case.  This is not recommended, and seems unnecessary with a federated Server/Portal.

How can I get the custom print service to print secured map services?

 

 

0 Kudos
1 Solution

Accepted Solutions
ANH
by
New Contributor II

Hi @ColForbin,

This is similar to what I was experiencing as well. My fix was to clear the brower's cache and / or use a different browser for testing. Hopefully that fixes your issue.

View solution in original post

0 Kudos
2 Replies
ANH
by
New Contributor II

Hi @ColForbin,

This is similar to what I was experiencing as well. My fix was to clear the brower's cache and / or use a different browser for testing. Hopefully that fixes your issue.

0 Kudos
ColForbin
Occasional Contributor

Thanks @ANH for the response!  Yes, I tried this yesterday and it worked!  I'm not sure why this would be the cause, but this is really good to know nonetheless.