As Learning application , i am using AngularJS,ADAL js and WebAPI as Mentioned in this post.
Angularjs-authentication-using-azure-active-directory-authentication-library-adal
Tutorial is very neat and clean for the implementation. After the authentication i am trying to add a User in the Azure AD[The same AD i validated my credentials against].
To work with Azure AD there is Azure AD Graph API.which requires a Bearer Token.
To get The Bearer token AuthorizationContext
will be used.
var authcontext = new AuthenticationContext(GraphRequest.authority);
AuthenticationResult authResult = authcontext.AcquireToken(GraphRequest.apiResourceId,
GraphRequest.clientId, GraphRequest.redirectUri);
As Authentication context is in control , so it is asking again credentials with popup. but i already have a claimPrincipal.
Is there any way i can use ClaimPrincipal to get the bearerToken ?