I wrote a console ASP.NET app to acquire accesstokens. I have clientId,client secret of my app and i do the following:
var authContext = new AuthenticationContext("https://login.windows.net/common/oauth2/authorize"); var acquireTask = authContext.AcquireTokenAsync(Resource, new ClientCredential(clientId,ClientSecret), new Uri(RedirectUri), new PlatformParameters(PromptBehavior.Auto));
This doesnot return the refreshToken. How can i get the refresh token. Seems like none of the overloaded methods namely AcquireTokenAsync return the refreshtokens. I tried using one with client credentials as well.
What's the correct procedure. None of the ADAl docs talk about this.