Questions tagged [msal-react]
113 questions
0
votes
1 answer
Secure way to decode microsoft login idToken in cakephp
Currently I am working with "Login with Microsoft" in my app. In my app, I am using react in client side and cakephp for backend. I am using @azure/msal-browser library in react. I have the following code in the frontend which initialized the msal…

Mahmudul
- 65
- 5
0
votes
0 answers
How to use environment variables in React app (static web app) hosted in Azure
I'm learning about React and authentication using MSAL and deploying a static web app in Azure.
I have authConfig.ts:
import { Configuration } from "@azure/msal-browser";
// Config object to be passed to Msal on creation
export const msalConfig:…

user989988
- 3,006
- 7
- 44
- 91
0
votes
1 answer
React Application MSAL authentication unable to read config values
I have an Azure Static Web App.
Since I don’t have enough permission, I’m unable to view the config settings of this app (REACT_APP_AAD_UI_APP_CLIENT_ID, REACT_APP_AAD_API_APP_CLIENT_ID, REACT_APP_AAD_APP_TENANT_ID,…

user989988
- 3,006
- 7
- 44
- 91
0
votes
2 answers
401 unauthorized on hitting endpoint using MSAL React Application authentication
I'm following this tutorial to authenticate a react application using MSAL and call my own api using the authentication token: https://github.com/oizhaolei/typescript-msal-sample
I added the following code to make an api call:
import { loginRequest,…

user989988
- 3,006
- 7
- 44
- 91
0
votes
0 answers
MSAL Error: You may need an appropriate loader to handle this file type
I am trying to configure Azure MSAL from scratch. This is new React app with v16.
But i am getting error. I have tried to download the Azure MSAL React example project it is working on React v18.
Getting error in file:…

Tushar
- 23
- 2
0
votes
1 answer
CORS Error with Microsoft MSAL-Node request
I am receiving a CORS error when I am attempting to receive an auth token through a client credential request using msal-node. I can get the token through a request with Postman but when I use my React App localhost it gives me a CORS error.
Do I…
0
votes
0 answers
Problem with Microsoft integration (msal) with https on redirectURI in react
I tried to implement msal to my react project. When I use localhost:3000 on msalIntance auth redirectUri, works perfectly. A popup appears and I can log into the application. The problem is when I put a https on the redirectUri. A popup appears and…

jaumeserr
- 39
- 1
- 8
0
votes
0 answers
Using MSAL (msal-react), how can I warn a user that they are going to be logged out soon?
I'm using MSAL library for in our React website (using msal-react) and check user auth using acquireTokenSilent.
As we see on banking and other websites, I want a warning that says "You'll be logged out in 5 minutes" and ideally with "Continue…

dmathisen
- 2,269
- 3
- 36
- 63
0
votes
0 answers
react-router-dom and azure/msal-react, acquiring token in react router loader after login redirect fails
I am building out a React application using react-router-dom (v6.4.3) for navigation and azure/msal-react (v18.0.24) for authenticating with our Azure AD tenant. The application is accessible externally but the entire application is protected by…

wizloc
- 2,202
- 4
- 28
- 54
0
votes
2 answers
InvalidAuthenticationToken error using msal and graph api from sharepoint
I am using the example msal-react to authenticate and consume sharepoint services using their graph api, create an application on AAD with delegated permissions.
I am assigning the scopes "https://mytenant.sharepoint.com/.default" and I get the…

shadowsa7x07
- 33
- 3
0
votes
0 answers
BrowserAuthError: interaction_in_progress when trying to get accesstoken in React
I am trying to used Azure AD to integrate my application, but I keep getting this error
AuthError.ts:49 Uncaught (in promise) BrowserAuthError: interaction_in_progress: Interaction is currently in progress. Please ensure that this interaction has…

potterson11
- 147
- 7
0
votes
1 answer
acquireTokenByClientCredentials in @azure/msal-react?
In msal-node, By ConfidentialClientApplication and acquireTokenByClientCredintial API I was able to authenticate successfully and get the token without specifying user login detials. I want the same functionality in my React app using msal-react.…

Kotana Sai
- 1,207
- 3
- 9
- 20
0
votes
1 answer
React MSAL Library msal-react : Issue in persisting the login session in different user-policies B2C application
I am using msal-react in my single page B2C application to sign in. I used the loginRedirect() function to login.
const { instance } = useMsal();
let {idToken} = await instance.loginRedirect();
This is allowing me to login successfully.
After login…

Sundeep
- 375
- 2
- 4
- 16
0
votes
0 answers
React MSAL Library msal-react : Issue in logging out in B2C application
I am using msal-react in my single page B2C application to sign in. I used the loginRedirect() function to login.
const { instance } = useMsal();
let {idToken} = await instance.loginRedirect();
This is allowing me to login successfully.
After login…

Sundeep
- 375
- 2
- 4
- 16
0
votes
0 answers
Implement dummy msal authentication using react
In our local Dev environment we would like to bypass the authentication and instead use some dummy authentication in place.
We are using the react-msal libraries for the authentication and it’s working as expected. But when it comes to the dummy…

Naresh
- 2,667
- 13
- 44
- 69