I'm currently trying to add a geoprocessing service to WebApp Builder in ArcGIS Online.
I followed the following steps here:
However when I add the rest endpoint for the tool into the print widget, it prompts for user credentials, even though they are embedded within the tool.
The geoprocessing service is in a standalone ArcGIS Server version 11.1, the tool was published from ArcGIS Pro 3.x.
The geoprocessing service security setting is set to private, which is why i think it prompts for login, but I would of thought that because I've embedded credentials that it would not prompt,
If I set the service security setting to public in arcgis server, the print widget works fine, however when it is set to private it prompts, is this expected behaviour? is there a way around it?
Has anyone else came across this, or been able to add a custom print service from a standalone ArcGIS Server into WebApp Builder in ArcGIS Online so users can use custom print templates/layouts.
Thanks in advance,
Kind regards
Keiran
Have you configured a valid SSL certificate with your ArcGIS Server 11.1?
To prove it works within your network, visit this page: https://developers.arcgis.com/javascript/latest/sample-code/widgets-print/
edit the code to amend portalItem and printServiceUrl to point towards your own services. Copy the code and run it in a local web server (VS code live server is great).
If you're still seeing issues with a valid certificate, consider importing the intermediate and root certificate from ArcGIS Online to your ArcGIS Server 11.1
The geoprocessing service security setting is set to private, which is why i think it prompts for login,
That is correct. Since your print service itself is secured, your web app challenges you for credentials to access that.
but I would of thought that because I've embedded credentials that it would not prompt,
Embedded credentials is for print service to use while accessing secured map/feature/image and other secured services.
If I may, I'm curious to know why are you embedding credentials within a print service. Most of the scenarios, you don't need to go in this route.
Thanks for getting back to me @TanuHoque and @A_Wyn_Jones,
@TanuHoque thank you for clarifying that for me, I wasn't sure if embedding credentials was for accessing secure services in the map, or if it was for the actual tool itself,
I wanted to have the print service/tool set to private, as I didn't want it to be public so if someone outside of the organization was to come across it, they could utilize it, so I thought if I set it to private then that would solve that problem, but then it would prompt organization users to login, but I didn't want users in our organization to need to login when using it, as that would be a bit annoying having to do that all the time,
So, I thought that embedding credentials would solve that, but after a bit of trial and error, it doesn't seem like that is what the intention is for embedding credentials,
@A_Wyn_Jones thanks for sending through the information, I hadn't looked into going down creating a custom print widget as at the moment its a bit out of skill, I was just publishing a web tool, but maybe I could look into that could look at doing that,