I am using Portal.
Is there a way to paste the original map service secure feature REST URL to a web map and store the credentials with the item?
So like that it does not prompt for authentication every time the web map opens.
Is your Server federated with Portal? If so, Portal should take over the authentication for the feature service.
If not, then you can be presented with the option to store credentials with the item when you add the feature service as an item to your Portal content. See Connect to secure services for more information.
Thank you Calvin,
I checked the second option, storing credentials, and it works fine. Thanks.
Additional question, is there a way to store credentials in an existing feature service after changing the URL from a non secured to a secured map service?
Glad that was able to work out for you. As for your second question, I believe you would have to add the service as a new item in order to get prompted to store credentials. I don't think the Portal interface will bring that up on its own.