deepesh
deepesh

Reputation: 65

Acquire token silently using ADAL JS

I have already established session with Azure AD through Open ID Connect, how do I acquire token silently from the browser, I mean without browser redirect, is it possible using ADAL JS?

Upvotes: 1

Views: 8209

Answers (1)

vibronet
vibronet

Reputation: 7394

it is possible. If you are using Angular, all you need to do is specifying the resource you want to target at init time, in the endpoints structure - see https://azure.microsoft.com/en-us/documentation/samples/active-directory-angularjs-singlepageapp-dotnet-webapi/. If you aren't using Angular, you can use the lower level functions available in adal.js. In particular, see AuthenticationContext.prototype.acquireToken in https://github.com/AzureAD/azure-activedirectory-library-for-js/blob/master/lib/adal.js

Upvotes: 2

Related Questions