Questions tagged [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.

1604 questions
22
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
  • 443
  • 1
  • 4
  • 10
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
  • 31,551
  • 46
  • 124
  • 206
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
  • 412
  • 1
  • 5
  • 11
14
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,447
  • 6
  • 23
  • 26
12
votes
3 answers

Microsoft Graph API token validation failure

I would use Microsoft Graph API in my Angular Web application. First I make connexion using msal library When I try log in with my profil I get this error I have configured my app as the mentionned in the official git sample MsalModule.forRoot({ …
infodev
  • 2,965
  • 10
  • 36
  • 87
12
votes
1 answer

MSAL Scopes (openid profile offline_access). Basic Simple Profiles May Not be Possible?

MSAL behaves as though there is a hard-coded catch 22 at its API library layer that seems illogical when I use it. string[] scopesArrayNonNullWORKS = new string[] { "email" }; string[] scopesArrayAlreadyThereInMsalCalls_FAILS = new string[] {…
Sql Surfer
  • 1,139
  • 7
  • 23
11
votes
1 answer

Angular Azure Active Directory B2C Authentication - CORS issue

I am implementing Azure Active Directory B2C authentication in Angular. I am using msal interceptor to connect Azure AD B2C. The authentication request fails with error Access to XMLHttpRequest at 'https://login.microsoftonline.com/...' from…
mani
  • 107
  • 10
11
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…
11
votes
1 answer

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,068
  • 1
  • 11
  • 19
10
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()…
Gerwin
  • 1,443
  • 2
  • 18
  • 48
10
votes
1 answer

Use MSAL Auth token to consume Web API 2

I have an ASP.Net Web API 2 on which I implemented the following security: https://docs.microsoft.com/en-us/azure/active-directory/develop/active-directory-devquickstarts-webapi-dotnet It worked, I can't access the controllers except if I remove the…
Pierre P.
  • 874
  • 18
  • 34
9
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. The I obtained the token from https://login.microsoftonline.com/{{my tennant guid}}/v2.0 however the issuer in the token that comes back is https://sts.windows.net//{{my…
Twisted
  • 2,334
  • 1
  • 24
  • 43
9
votes
1 answer

MSAL for Android fails performing B2C login

I'm using 0.2.2 version of Microsoft Authentication Library (MSAL) Preview for Android library to perform Azure AD B2C login in my native Android app. The library opens the browser to start login process. Afterwards I log in successfully and it…
Ugurcan Yildirim
  • 4,820
  • 2
  • 33
  • 65
9
votes
1 answer

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,655
  • 1
  • 17
  • 31
9
votes
3 answers

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 graph api) using acquiretokensilent method. I renew…
CKS
  • 447
  • 1
  • 7
  • 15
1
2 3
99 100