Questions tagged [azure-ad-msal]

The Microsoft Authentication Libraries (MSAL) gives you the ability to add support for Azure Active Directory v2 (serves Microsoft Account and AAD) and B2C. Supports native clients such as Windows, iOS, OSX, Android, and Linux.

2700 questions
42
votes
9 answers

BrowserAuthError: interaction_in_progress: Interaction is currently in progress with azure/msal-browser@2.11.2

I has this error when trying to loginRedirect in React app using @azure/msal-react@1.0.0-alpha.6 and @azure/msal-browser@2.11.2. The login data returns correctly but the exception is raised in the console. Uncaught (in promise) BrowserAuthError:…
beewest
  • 4,486
  • 7
  • 36
  • 63
30
votes
2 answers

Issuer in access token from azure active directory is https://sts.windows.net when I'm expecting https://login.microsoftonline.com

I'm trying to validate an access token obtained from azure active directory. I obtained the token from https://login.microsoftonline.com/{{my tennant guid}}/v2.0 The issuer in the token that comes back is https://sts.windows.net//{{my tennant…
Twisted
  • 2,939
  • 4
  • 32
  • 54
25
votes
4 answers

How to properly import and use the MSAL (Microsoft Authentication Library for js) into a typescript react single page application?

Problem I can't seem to get the MSAL library to import properly into my typescript code. I'm using the MSAL for JS library (which is supposed to have typings) in a simple typescript/react project scaffolded using the create-react-app with…
nbrowne
  • 481
  • 1
  • 5
  • 10
20
votes
2 answers

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 and there are two ways of doing this: silently…
chivano
  • 603
  • 1
  • 5
  • 13
17
votes
2 answers

Creating a single instance of a class within a Vue application

I'm new to Vue and I'm struggling to wrap my head around how to implement what seems to me like a good case for a global variable or singleton. The background is that I'm using Azure AD B2C for authentication with the MSAL library. MSAL requires a…
AndyM
  • 1,148
  • 1
  • 10
  • 19
16
votes
5 answers

Azure AD Authentication 401 error "the audience is invalid" AddAzureADBearer .Net Core Web Api

I'm trying to create a simple example of Azure AD authentication using this sample except for my client is JQuery. I am not sure why I get the 401 error about the audience is invalid when the token shows the audience is…
16
votes
1 answer

What is the difference between ADAL.js and MSAL.js?

I am trying to handle authentication for my app which uses Microsoft Graph. What is the difference between these two libraries? Active Directory Authentication Library for JavaScript (ADAL.js) Microsoft Authentication Library for JavaScript…
Hongbo Miao
  • 45,290
  • 60
  • 174
  • 267
16
votes
3 answers

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.
  • 6,955
  • 6
  • 26
  • 26
15
votes
2 answers

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 already saved in browser's storage My current…
Daniel San
  • 1,937
  • 3
  • 19
  • 36
15
votes
1 answer

MSAL or ADAL library for use with Azure AD B2C and Xamarin

As of October 2016, is it still the case that the Microsoft Authentication Library (MSAL - NuGet package: Microsoft.Identity.Client) is the correct/only library to use with Xamarin (iOS/Android) and the Azure AD B2C service? This library (MSAL) is…
Jeremy Ellis
  • 452
  • 1
  • 5
  • 11
13
votes
3 answers

AADSTS65001: The user or administrator has not consented to use the application with ID

I'm developing an Angular + Flask application that uses Microsoft's OAuth2 (On-Behalf-Of-User Flow). I'm trying to call an API from the backend, but I get an exception. Here is the configuration in app.module.ts: export function…
Hajar
  • 135
  • 1
  • 1
  • 6
13
votes
2 answers

Token cache serialization in MSAL.NET is not working

I am facing some issues when trying to serialize the tokencache, returned from authenticating with MSAL. I would appreciate any help, since i don't really understand what i am doing wrong. Here is our situation/problem: We are currently using ADAL…
Mira
  • 181
  • 1
  • 9
12
votes
2 answers

TypeError: performanceMeasurement.startMeasurement is not a function

Error simply occured when trying to hit login from @azure/msal-react in Next 13. When I checked the error log, it's coming from core library @azure/msal-react. I also tried with login popup, but the error still same I have code, in my auth.ts export…
12
votes
2 answers

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. I am using msal.js 2.0 @azure/msal-browser to…
afriedman111
  • 1,925
  • 4
  • 25
  • 42
12
votes
2 answers

Login with AAD MSAL - Login is already in progress

I have a ASP.net website, that uses MSAL to login. The issue I keep having is that, whenever the user logs in, then logs out again the user is redirected to a logout page. This page implements the new Msal.UserAgentApplication(msalConfig).logout()…
1
2 3
99 100