I have an ASP.NET C# web application that authenticates a user via their username and password. Once the user is authenticated, the app generates an ArcGIS token using Esri's Generate Token operation (http://resources.arcgis.com/en/help/rest/apiref/generatetoken.html). Once the ArcGIS token is received, the web application can access secured map services from the ArcGIS server.

The web application is authenticating against the same LDAP directory as the ArcGIS server.

My problem is that if I need to generate a new ArcGIS token from the web application, I cannot do so without forcing the user to login again because I don't have the password (and I don't want to store the password). If the ArcGIS token expires, then the web application loses access to the secured map service. If in the future, I implement an authentication system that doesn't require a username or password (Oauth via Facebook for example), then I would never be able to generate the ArcGIS token.

Note: I have to use ArcGIS Server - I cannot use Portal or ArcGIS Online.

Is there another way to generate the ArcGIS token? Is there a way for me to specify, upfront, what the token value will be? Has anyone experience this before and come up with a solution?

  • Tokens are designed to be of limited duration. I suggest you look at using the Web Adaptor to interface with LDAP.
    – Vince
    Commented Sep 15, 2017 at 0:17
  • Just request a long duration token by including the expiration parameter. Commented Sep 15, 2017 at 3:10
  • It is a good question. Is there a way to generate a token from a token for the purpose of allowing the user to be able to access resources without needing to sign in again? If the user visits the site often enough they should never have to sign in again. How can this be done?
    – ca0v
    Commented Aug 2, 2021 at 12:54

1 Answer 1


I would recommend using a proxy. My team currently runs a similar setup, with multiple credentials for separate SDE instances, for separate clients. We use a separate proxy file to store credentials, then run things through there to avoid duplicate authentication requests. Here are some helpful articles on this:



Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.