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.
Questions tagged [azure-ad-msal]
2700 questions
9
votes
4 answers
How to open Android Outlook application from an external one
I'm currently developing an Android application in order to display home screen widgets. Those ones are related to Microsoft Outlook (Events + Messages) in order to show incoming events and unread new messages in a kind of dynamic tiles.
The Msal…

Predalpha
- 139
- 1
- 9
9
votes
4 answers
passport-azure-ad veriy msal.js token with Bearer Strategy
Im trying to integrate msal.js library(https://github.com/AzureAD/microsoft-authentication-library-for-js) with passport-azure-ad (https://github.com/AzureAD/passport-azure-ad) Bearer Strategy.
My configurations are as follows:
Msal.js
{
…

ruciu
- 672
- 8
- 17
9
votes
1 answer
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 fine.
Now, I am trying to use MSAL.js for…

Sat Thiru
- 922
- 2
- 10
- 20
9
votes
4 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
- 497
- 3
- 9
- 16
9
votes
1 answer
Azure Active Directory v2.0 Daemons and Server Side Apps Support
Trying to get clarity as to if the current v2.0 endpoint supports the Daemons and server-side apps flow.
This article talks about the flows: https://learn.microsoft.com/en-us/azure/active-directory/develop/active-directory-v2-flows
It states:
This…

Montané Hamilton
- 547
- 1
- 7
- 17
9
votes
1 answer
How should I determine if an MSAL account has an Exchange based email system? (got an exception)
I am working with MSAL and have a user who received the following error:
{
"error":{
"code":"ResourceNotFound",
"message":"Resource could not be discovered.",
"innerError":{
…

makerofthings7
- 60,103
- 53
- 215
- 448
8
votes
5 answers
DelegateAuthenticationProvider not found after updating Microsoft Graph
I have the following code (copied from Microsoft Learn), that was working fine with Microsoft.Graph 4.54.0
var authProvider = new DelegateAuthenticationProvider(async (request) => {
// Use Microsoft.Identity.Client to retrieve token
…

Shiraz Bhaiji
- 64,065
- 34
- 143
- 252
8
votes
3 answers
Use IMAP with XOAUTH2 and MS365 Application permissions to authenticate IMAP for a user
I have an older Python project that uses standard IMAP mechanisms to retrieve emails, etc. from a mailbox for processing. Unfortunately, with MS365 now retiring non-OAuth2 and non-modern auth, I have to try and write an application that does NOT…

Thomas Ward
- 2,714
- 7
- 36
- 51
8
votes
1 answer
React jest and MSAL getting BrowserAuthError
I'm trying to test a few components that are using MSAL for authentication.
Thus far, I have a simple test, which test if my component can render, as follows:
let container;
beforeEach(() => {
container = render( )
});
test('Component…

Jeppe Christensen
- 1,680
- 2
- 21
- 50
8
votes
3 answers
How to handle tokens for multiple resources in blazor webassembly MSAL
There is no real solution to this issue, only various workarounds until net7 comes around. In net7 we should once again be able to request scopes from multiple sources in one call according to https://github.com/dotnet/aspnetcore/pull/43954
I have…

Archigo
- 105
- 6
8
votes
3 answers
Microsoft Identity Web: Change Redirect Uri
I am using .net 5, Identity Web Ui to access Microsoft Graph. Where can I configure my Redirect URI?
I need to specify the full Uri, since the generated one from callbackUri is incorrect due to being behind a Load Balancer with SSL offload.
Here is…

Richard Hubley
- 2,180
- 22
- 29
8
votes
3 answers
Calling Microsoft Graph API using user context/user token C#
I have a web application where user logins using the approach defined in this sample.
Now I want to call Microsoft Graph for this User. I have gone through many documents and it's very confusing how this should be done. This is what I have tried. I…

user911
- 1,509
- 6
- 26
- 52
8
votes
1 answer
ClientAuthError: Token calls are blocked in hidden iframes
I'm building a javascript SPA using MSAL.js as a client for Azure Active Directory.
When requesting an access token for my API as such
var requestObj = {
scopes: ["api://MyApi/Access"]
};
msalUserAgent.acquireTokenSilent(requestObj )
Msal…

Twisted
- 2,939
- 4
- 32
- 54
8
votes
3 answers
MSAL authentication and authorization from React to Web API
I have some trouble understanding the MSAL authentication and authorization. I have a single page app developed in React. I have setup the MSAL Azure SSO authentication by registering the web app on the Azure AD. Now, I have a Web API (in .Net Core)…

Souvik Ghosh
- 4,456
- 13
- 56
- 78
8
votes
2 answers
Is ConfidentialClientApplication.AcquireTokenForClient().ExecuteAsync() thread safe?
For service to service auth using a bearer token for the app (client id and secret no user context) in .net core using MSAL.NET v4 (nuget Microsoft.Identity.Client v4.3.0) is ConfidentialClientApplication.AcquireTokenForClient().ExecuteAsync() safe…

Aquila Sands
- 1,471
- 1
- 20
- 28