Skip to main content

Questions tagged [msal.js]

The Microsoft Authentication Library for JavaScript enables client-side JavaScript web applications, running in a web browser, to authenticate users using Azure AD for work and school accounts (AAD), Microsoft personal accounts (MSA), and social identity providers like Facebook, Google, LinkedIn, Microsoft accounts, etc. through Azure AD B2C service.

268 questions with no upvoted or accepted answers
6 votes
0 answers
5k views

How Do I Mock MSAL Authentication?

I have added authentication to my web app using MSAL which connects to Azure Active Directory B2C. This works fine when I am connected and can access the Microsoft site. However, it fails when I am ...
opticyclic's user avatar
  • 7,936
5 votes
0 answers
2k views

What to implement when "msal:acquireTokenFailure" is thrown?

I know this should be simple, but a little help would be appreciated; we're all a bit new to using industrial strength typescript packages. We're building an Angular App and using the @azure/msal-...
Ross Halliday's user avatar
5 votes
0 answers
541 views

Accessing Azure AD groups using MSAL in React

I am using a create-react-app based project that uses react-aad-msal to authenticate to Azure AD on the client. This is working correctly and I can retrieve basic user details after authentication. ...
Mike Cole's user avatar
  • 14.6k
5 votes
2 answers
4k views

ID tokens vs Access tokens in implicit grant flow

I would like some clarification on how to use ID tokens and access tokens in an implicit grant flow. I have an Angular SPA using MSAL.js for Angular package and a Web API. The API does NOT call any ...
oskarm's user avatar
  • 153
5 votes
1 answer
2k views

MSAL with Azure AD B2C and Single Sign On

I'm working on a system with a few Angular 4 SPAs each talking to a separate Asp.NET Core 2.0 WebAPI. Azure AD B2C is being used as the identity service for each SPA/API, and MSAL.js as part of our ...
TonE's user avatar
  • 3,025
4 votes
1 answer
5k views

How to trigger an session expired popup after ten minutes using @msal - react and azure ad

Auth Provider : Azure Active Directory Client library : @azure/msal-react As explained here my msal token expires after one hour MSAL token expires after 1 hour, My requirement is I would like to ...
Deepak Kothari's user avatar
4 votes
1 answer
3k views

How to validate the token sent by angular app to the backend API against Azure AD?

Azure AD B2B with MSAL - Angular app is able to authenticate the user and gets the token. Now angular app needs to call APIs (spring boot with MSAL library). How can this token be validated against ...
user3760894's user avatar
4 votes
0 answers
523 views

Can't silently refresh security token, Azure B2C, Blazor WASM

I'm making a Blazor WASM app and followed these instructions to enable authentication. Secure and ASP.NET Core Blazor WASM I added one line to the Program.cs file... options.ProviderOptions.Cache....
JustinM's user avatar
  • 993
4 votes
1 answer
5k views

Angular MsalGuard for Authentication and written own Guard for Authorize, Need to wait for authentication first

I have an application where there are two guards (MsalGuard - for Authentication, AuthGuard - written own code to authorize whether the user is having access to that particular page). Using the ...
Karthik Myakala's user avatar
4 votes
4 answers
2k views

Angular app which invokes B2C-secured Function App API receives 500, Function receives 404

Angular site hosted on an Azure storage account as a static website receives 500 when it's invoking an Azure B2C-protected Function App function. The function is receiving a 404. Update The original ...
CalvinDale's user avatar
  • 9,521
4 votes
2 answers
4k views

msal.js loginRedirect() repeatedly redirecting to sign in window react.js

We are using Active Directory (Azure AD) v2.0 endpoint and using msal.js for sign in and its repeatedly asking for sign in let app = new Msal.UserAgentApplication( applicationConfig.clientID, ...
Agrawal Shraddha's user avatar
3 votes
0 answers
287 views

Unable to run react jest test cases azure msal

I am working on react app, integrated msal library for azure authentications. I am trying to setup jest in project to run test cases. But i am getting error while running tests. export { MsalConsumer,...
skyshine's user avatar
  • 2,852
3 votes
0 answers
244 views

Redirecting to Microsoft account selection after logout, how to skip Microsoft account popup and directly redirect to logout?

I'm currently facing an issue with the logout functionality in my web application. After clicking on the logout button, instead of immediately redirecting to the logout page, I'm being redirected to a ...
user19141723's user avatar
3 votes
1 answer
390 views

A simpler MSAL.js auth like Google? (without using the caching system)

I'm really struggling with the Microsoft Graph authentication system (compared to Google Auth API). I just want to use the stored tokens to make API calls (without managing a caching system or ...
Simo's user avatar
  • 476
3 votes
1 answer
3k views

MSAL with angular fails to authenticate - fails while attempting to discover the instance

While using SSO to sign on Azure using MSAL with Angular, I get redirected this URL: https://login.microsoftonline.com/common//discovery/instance?api-version=1.1&authorization_endpoint=https://...
thomas's user avatar
  • 50

15 30 50 per page
1
2 3 4 5
18