Our application is developed in angularjs and C#.I was using ADAL.js for azure ad login. As it is deprecating, we are migrating into MSALjs . I have removed all references of ADAL and replaced it with MSALand MSAL config is as below
authority: "https://login.microsoftonline.com/common",
clientID: AppClientId,
redirectUri: "http://localhost:8080/#/home",
postLogoutRedirectUri: logoutredirecURL,
navigateToLoginRequestUrl: true,
optionalParams: {
protectedResourceMap: GetEndPoints()
},
tokenReceivedCallback: function (errorDesc, token, error, tokenType) {
console.log('token : ' + token);
localStorage.setItem('Authorization', 'Bearer ' + token);
}
I am able to redirect to LOgin URL of azure and after input of credential the isAuthorized is also true. While sending the request to server the below code
HttpActionContext.ControllerContext.RequestContext.Principal.IsAuthenticated
This isAuthenticated is getting false, in ADAL it was getting true . I dont know where I am getting wrong.
PrincipalClaims are not getting fetched of User.
Please help and Thanks in Advance
You can find the implementation of Pkce flow of MSAL.js which can help you in your development here.