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.

msal.js
21 votes
2 answers
33k views

Unable to acquire token silently or via redirect using msal-browser

I'm trying to develop a VueJS single page application that logs you into AAD so that I can get an access token to call various APIs (e.g. Graph). Once a user is logged in, you have to acquire a token ...
chivano's user avatar
  • 633
18 votes
1 answer
3k views

Azure MSAL JS: How to edit profile?

I've successfully implemented MSAL JS for Azure AD B2C. The next step is to let the user edit their profile. I've created a new policy for Edit Profile. But how to redirect the user there? There are ...
Boland's user avatar
  • 1,561
16 votes
2 answers
27k views

How to know if a given user is already logged in with MSAL?

With msal.js library (The Microsoft Authentication Library), which is the way to know if a given user is already logged in? My intention is to avoid to show login pop-up if the user's credentials are ...
Daniel San's user avatar
  • 1,966
16 votes
3 answers
30k views

Is it possible to use MSAL.js to get refresh token?

I want to integrate with Miscrosoft Outlook. I am able to login with MSAL.js and get an access token, but I am not able to get a refresh token. Is there a way to do it?
Igor G.'s user avatar
  • 6,979
15 votes
2 answers
24k views

msal.js 2.0 tokenResponse null after loginRedirect

I am developing an Angular 10 app that utilizes Azure B2C for policy and user management. I set up my app registration in Azure Active Directory as a singlepage app without the implicit option checked....
afriedman111's user avatar
  • 2,231
14 votes
2 answers
13k views

Mocking authentication when testing MSAL React Apps

Our app is wrapped in the MSAL Authentication Template from @azure/msal-react in a standard way - key code segments are summarized below. We would like to test app's individual components using react ...
savreline's user avatar
  • 301
12 votes
1 answer
27k views

How to specify Resource URI when acquiring access token for Azure AD V2 endpoint?

I have used ADAL.js in a previous project which supported only work accounts and am able to successfully acquire idtokens and then accesstokens to an API (ResourceURI: "https://myresource.com"). Works ...
Sat Thiru's user avatar
  • 982
11 votes
3 answers
15k views

MSAL.js protectedResourceMap - explanation needed for what to set it to

I have 2 sites, an angular application and a WebAPI. When I use MSAL.js from the frontend to call the WebAPI, no token is being attached (because of CORS). I know I need to set protectedResourceMap ...
Beakie's user avatar
  • 1,999
11 votes
4 answers
14k views

how do we renew idtoken using msal?

I am currently trying to develop an SPA application with a webapi, I am using msal for login. The flow is the user logs in, gets an idtoken (used to authorize for my api), gets an access token (for ...
CKS's user avatar
  • 517
9 votes
3 answers
2k views

@azure/msal-browser TypeError: this.startPerformanceMeasurement is not a function

Introduction Because there is no build in Auth library for nuxt 3 yet, I am trying to create my own composable called useAuth. The Problem I am getting a startPerformanceMeasurement error when i try ...
Eric's user avatar
  • 401
7 votes
3 answers
7k views

No refreshToken in msal-node when providing scope "offline-access"

I hope you can help me: I currently develop an app which needs access to the users calendar (outlook-calendar) to find free meeting slots (other users will be able to see and then select one of the ...
Lasklu's user avatar
  • 123
7 votes
1 answer
11k views

msal.js - Logout without redirect

Is it possible to log out without redirect? Every time I sign up user I need to verify if the user that is in external DB (db with invitation tokens). I do it just after sign up is completed. When I ...
Akak's user avatar
  • 95
7 votes
2 answers
29k views

How do I resolve a "No reply address provided" error when using MSAL.js?

I've copied the example app at this repository to try to implement single sign-on: https://github.com/Azure-Samples/ms-identity-javascript-v2. Into the msalConfig's auth object within the authConfig....
notnot's user avatar
  • 4,612
7 votes
3 answers
4k views

Microsoft Authentication React "hash_empty_error" when using loginPopup

I am failing to understand the error that I am getting while trying to authenticate a user with the Micrsoft Authentication library for React (PWA). I need help understanding why it fails when ...
0xdeadbeef's user avatar
7 votes
1 answer
3k views

msal.js angular 6 SPA callback and errors handling

I m using msal.js on a angular 6 SPA to handle authentication, I have a few problems: First, I couldn t find a clear example on how to handle errors with the lib, so I picked things left and right, ...
lazizanie's user avatar
  • 504

15 30 50 per page
1
2 3 4 5
36