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.
2,179
questions
0
votes
0
answers
7
views
Verifying Token from MSAL-React on Backend
I'm currently working on a project that has a frontend built with React and is using authentication from Azure AD. I'm using the MSAL-React package on the frontend to handle login.
When a user makes ...
-1
votes
0
answers
18
views
how to solve crypto not defined error in vue 3 [closed]
error image
FAIL src/app.spec.ts [ src/app.spec.ts ]
BrowserAuthError: crypto_nonexistent: The crypto object or function is not available.
Detail:Browser crypto or msCrypto object not available.
❯ ...
0
votes
0
answers
19
views
Using Azure token from WAM/MSAL for authentication to custom API
Brief description
In the process of writing a desktop .NET Core application that authenticates to a custom API using MSAL, I've encountered a problem with the tokens not containing the necessary ...
1
vote
1
answer
33
views
POST oauth2/v2.0/token 400 (Bad Request) when following the official MSAL React tutorial
I am at a loss with just the README. It mentions nothing of this. I downloaded this project and followed the tutorial to customize authConfig.js, I even removed everything except my sign in policy in ...
0
votes
1
answer
55
views
How do I run a third-party API through Azure AD?
I am looking for a way to run a third-party's OAuth2 (Authorization Code flow) API through Azure AD, because I really like the MSAL library in .NET and wouldn't want to reinvent the wheel, so to speak....
0
votes
0
answers
13
views
ClientAuthError: User cancelled the flow in MS Webchat SSO login
Code base used - Repo Link: https://github.com/microsoft/BotFramework-WebChat/tree/master/samples/07.advanced-web-chat-apps/e.sso-on-behalf-of-authentication#setup-oauth-via-azure-active-directory-for-...
0
votes
0
answers
28
views
angular - dynamically include or remove an interceptor
Is it possible to dynamically include or exclude an interceptor?
For example, I would like to enable Azure AD based SSO in my application using microsoft's @azure/msal-angular package https://www....
0
votes
0
answers
19
views
I'm trying to create a test app using the msal-angular14 sample, but getting stuck on Error: NG0203: inject()
I'm trying to create a sample app to upgrade a project's version of Angular. Using this sample provided by MS:
https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/samples/msal-...
0
votes
0
answers
10
views
How access info from Azure AD after user is authenticated prior to any action in ASP.Net MVC when using MS Identity platform (Azure AD Authentication)
I have created an app which is using Azure AD authentication. After user is authenticated, I want to get the user's unique Id and get the group information which I want to save in a session so then ...
0
votes
1
answer
63
views
Authenticate in Azure AD silently from a domain joined machine
In our environment Windows machines are domain joined, and Azure AD Connect Sync is used to connect the domain to Azure AD. My goal to authenticate in Azure using the context of the currently logged ...
0
votes
0
answers
19
views
msal angular get a picture of the user
I'm using with azure/msal-angular Library. and I'm trying to get a picture of the user profile.
This is me code in app.module.ts
MsalModule.forRoot( new PublicClientApplication({
auth: {
...
0
votes
0
answers
70
views
Azure Data bricks authentication life cycle with ASP.NET Core Web API?
I'm working with an ASP.NET Core Web API. I'm calling Data Bricks job from the API using a MSAL.net token.
I'm trying to connect DATA lake from my python job which is inside Data bricks.
I want to use ...
0
votes
0
answers
40
views
Authenticate external clients using Bearer Token using PowerShell script
Scenario: I have a Function App deployed in Azure that needs to be called from a PowerShell client in a non-Microsoft domain. My logic is to authenticate the user via their onMicrosoft domain email ...
0
votes
3
answers
80
views
How to get user token with Azure AD app with MSAL.net?
I'm using MSAL.net in my application. I have registered my application in Azure Active Directory and did rest of configuration which is required.
In my Web API, I have some endpoint call to get the ...
0
votes
0
answers
49
views
Access all the access tokens from tokenCache in MSAL for Java
I have a web application which uses MSAL for Java for Microsoft identity login. My application needs access to two resources.
Graph API.
Teams API for calling some undocumented Teams API.
(These ...
0
votes
1
answer
45
views
Get-MsalToken: The property 'Authority' cannot be found on this object
I am creating dashboard with Powershell Universal (https://docs.powershelluniversal.com/userinterfaces/dashboards) and I am trying to get an access token in order to connect to MS Graph. I am using ...
1
vote
1
answer
24
views
MSAL AcquireTokenWithDeviceCode Authentification on Clientside/Browser
i want to get access on OneDrive with Microsoft Graph SDK. I have a WebServer running on Azure. My Problem is that i activated 2Factor on microsoft acc and simple give username and password is not ...
0
votes
1
answer
40
views
Django app with MS Azure SAML SSO using MSAL
I have an application created using Django that uses MSAL library to authenticate with Azure AD.
As I understand, MSAL uses OAuth and so far the authentication/authorization works great. Is there a ...
0
votes
0
answers
17
views
Does Service Principal (SPN) values has to be change while doing ADAL.Net to MSAL.Net migration?
We have a Web Application in .Net Core 6.0 that we have registered in Azure AD app registration in azure portal.
We have used ADAL.net library in our code for Authentication. Now, we are migrating ...
0
votes
1
answer
36
views
Angular application Msal requires login in a new tab
So currently when I use my application it's working great in navigating to new views etc, but when I copy paste a link into a new tab I get to the login view where it says this user is logged in but I ...
0
votes
0
answers
23
views
Authentication with vue-msal does not work
I am trying to authenticate my Vue 2.x app (created with Vite) with vue-msal.
The result: when I first enter the app, I get redirected to Sign in, the credentials are valid so the login works, and ...
1
vote
1
answer
58
views
ASP.NET Core Web API - can't authenticate - Getting 401 -
I'm trying to call my ASP.NET Core Web API from a Vue3 app.
I have used the "connected services" in ASP.NET to configure AAD integration.
It has added the following code:
Program.cs
builder....
0
votes
0
answers
24
views
Share MSAL session with Xamarin WebView controller
I'm developing a Xamarin mobile app that uses Microsoft Authentication Library to handle the login flow. With this MSAL library I'm able to open the system browser and get the token.
But this app also ...
0
votes
1
answer
73
views
Azure AD : how to redirect to sign in page by code manually
I followed this official sample to integrate Azure AD authentication into my ASP.NET Core application. Everything is working well, and I can call the MS Graph API successfully.
The problem is that ...
0
votes
1
answer
58
views
Next.js/MSAL: Text does not match server-rendered html
I am trying to set up next.js with azure ad b2c using the MSAL (react) library. Msal provides a nice component <MsalAuthenticationTemplate /> to handle auth.
I made a minimum next.js page.
...
0
votes
1
answer
51
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 ...
0
votes
1
answer
42
views
CORS error using passport-azure-ad on React + Express app
I have a React + Express app for which I am using the passport-azure-ad OIDCStrategy, but I'm having trouble with CORS.
The error I am receiving is:
Access to XMLHttpRequest at 'https://login....
0
votes
1
answer
27
views
Integrate MSAL / AAD auth into existing server-client JWT auth
We have an existing API with role based authentication using JWTs and looking to integrate Azure AD auth as an alternative to our current username + password based auth flow.
The current flow is best ...
0
votes
1
answer
46
views
User is not prompted for a password after signing out from local B2C
We are using msal-react library to login to Azure ADB2C. We support both externally federated users and "local" users, which are stored in our Azure ADB2C tenant. However, when my "...
2
votes
1
answer
76
views
How to redirect a user when the access token expires in MSAL for Angular?
I want to make sure that the user of a Single Page Application gets redirected back to the login page when the access token expires.
As far as I understand MSAL automatically refreshes the access ...
0
votes
1
answer
35
views
what is difference between ConfidentialClientApplicationBuilder vs ITokenAcquisition?
what is difference between ConfidentialClientApplicationBuilder vs ITokenAcquisition ?
as per understanding ConfidentialClientApplicationBuilder use for application token.
ITokenAcquisition for ...
0
votes
1
answer
22
views
Missing BroadcastService in @azure/msal-angular@2.X.X
I'm trying to update MSAL Angular v1 to v2 now, but have had some problems. One of them is that BroadcastService is missing in V2.
I have followed this guide, but none mentions what an equivalent of ...
0
votes
1
answer
40
views
Getting HTTP/1.1 401 Unauthorized as a response while using MSAL4J library to perform user create operation on Azure AD
I am using following java code for creating user in Azure Active directory by using MSAL4J library.
HttpPost create = null;
HttpGet getRequest = null;
HttpClient client = null;
...
1
vote
1
answer
43
views
How to add additional parameter to my azure ad login link to modify the login functionality?
Right now I am working with the application which automatically logs in user through microsoft account after user enters the credentials once. This is how I am trying to call the microsoft login:
...
1
vote
0
answers
84
views
Assertion is not within its valid time range. Ensure that the access token is not expired before using it for user assertion, or request a new token
I am trying to generate access token using On-Behalf-Of flow which will be used to authenticate API calls. I am adding a claim called userIdToken which is value of id_token in startup file(sample ...
1
vote
1
answer
36
views
MSAL Azure B2C: which field do I send as bearer token to make authorized API requests?
I have React (full-stack Next.js) application which uses Azure B2C with MSAL for authentication. I got the PKCE login flow (just has Google as provider) working and I am calling acquireTokenSilent to ...
0
votes
0
answers
23
views
While implementing the MSAL Authentication, not able to make the Graph API Call
I am trying to make a Graph API call after getting the access token but not able to make the graph API call function.
Facing the error in calling the function, actually I don't have an idea about the ...
0
votes
1
answer
129
views
.Net MAUI WebAuthenticator CallbackUrl for social logins
I'm following this guide to setup authenticating with social logins using MSAL and Web Authenticator. The example call looks like this:
WebAuthenticatorResult authResult = await WebAuthenticator....
0
votes
0
answers
19
views
Unity3D Microsoft Authentication Library (MSAL) plugin for ios
Not able to make MSAL plugin for ios plugin for Unity. Is anyone can help me with it. Not able to get any proper tutorial or documentation on this. https://docs.microsoft.com/en-us/azure/active-...
1
vote
0
answers
28
views
Anyway to tell in msal.js if authentication was an existing user login or a new user signup
We are using @azure/msal-browser and @azure/msal-react and have the standard authentication flow in our React app, as is show in the code samples below.
We are using Azure External Identities user ...
2
votes
1
answer
42
views
How to edit the MSAL login commands to make it work for multiple users?
I have the following code working and I'm able to login with username and password.
I am working with Cypress to login to a webapp with MSAL.
In the e2e Testfile:
describe('Login with MSAL as ...
1
vote
1
answer
25
views
APIM Gateway and protecting API with OAuth
I have API which is hosted in Azure. It is using Microsoft Identity platform for Authorization. Now we need to integrate APIM Gateway for the API. APIM also provides OAuth Authorization. So my ...
0
votes
2
answers
64
views
Graph API - How to get Last login date of the logged on user in Angular using Azure AD Authentication
We have angular 13 based application. We are using Azure AD Authentication. When user hit's the Portal URL, he is asked to key in credentials. After successful authentication, user is redirected to a ...
0
votes
0
answers
70
views
Terraform - Az Cli - MSAL token error - User does not exist
since today I am experiencing an error concerning terraform initilization using Azure AD Authentication.
Terrform v1.2.2
Az Cli v2.37.0
terraform {
required_providers {
azurerm = {
source ...
0
votes
0
answers
48
views
Device code flow: Microsoft.Identity.Client.MsalServiceException: AADSTS70011: The provided value for the input parameter 'scope' is not valid
This question is not a duplicate of AADSTS70011: The provided value for the input parameter 'scope' is not valid because that post didn't solve my problem.
This is the code:
using Microsoft.Identity....
0
votes
1
answer
84
views
How do I know which permissions I need to set up for an Microsoft Identity Platform/Azure AD/MSAL app?
I know how to register an all in Azure AD. I also know how to retrieve an access token with MSAL. When I make a request I get this error:
$ curl https://graph.microsoft.com/v1.0/me -H "...
-1
votes
0
answers
19
views
WPF - use ConfidentialClientApplication class in WPF app
I am building an application from WPF application and try to use MSAL library for authentication
our Azure AD Enterprise applications registered is Confidential app so I am using ...
0
votes
0
answers
31
views
Need Cors enabled ? "Tokens issued for the 'Single-Page Application' client-type may only be redeemed via cross-origin requests"
I am trying to get an Azure token from an internal tool at work but it responds with:
statusCode: 400
ResponseBody: {
"error":"invalid_request",
"error_description":"...
1
vote
1
answer
60
views
Securing a .NET core API using a react frontend
Currently I have a react frontend that authenticates users using msal.js (Azure AD B2C). The backend API is built with .NET Core and currently accessible to anyone.
I would like to secure the API so ...
0
votes
1
answer
103
views
How to connect to Microsoft Dataverse API Endpoint with Python
I'm facing an issue in connecting to Microsoft Dataverse API endpoint through Python.
The code is broken down into three parts:
A) Token Generation
B) Endpoint API call Option 1
C) Endpoint API call ...