Questions tagged [msal-react]
113 questions
0
votes
1 answer
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 "local" B2C user signs out, even though I see tokens gone from the…

Marina Gurevich
- 51
- 7
0
votes
2 answers
What is the access_token lifetime for a B2C custom policy used by a SPA application?
While trying to find a way to maximize the time before a user has to do a reauthentication (especially in cases when the user does a social login, e.g. sign in with microsoft).
I have stumbled upon this microsoft documentation which states token…

milorad
- 121
- 2
- 12
0
votes
2 answers
React-Apollo msal-browser with msal-react wrapper does not get accounts
I am moving my package from react-adal to @azure/msal-react. In react-adal I can authorise and able to go my app. I am using same client_id and Tenant_id but seems like getAllAccounts() returns me empty array, it means no user found as a result I am…

Krisna
- 2,854
- 2
- 24
- 66
0
votes
1 answer
How to authenticate my Express API's that is hosted on Heroku
I have just developed a PERN stack SPA where the app and the server are both hosted on Heroku. The SPA uses Azure authentication (MSAL). Everything works well and user on authentication is redirected to our SPA hosted on Heroku.
Now the API which is…

Joy
- 105
- 1
- 2
- 10
0
votes
0 answers
Validating tenant in multitenant React apps using MSAL
We're working on moving some apps from Razor Pages to React, and we'd like to use Microsoft Identity Platform for authentication via MSAL.
Some of these apps are multi-tenant, and we want to be able to validate that a given tenant is set up and…

Josh Anderson
- 5,975
- 2
- 35
- 48
0
votes
1 answer
Azure AD restrict users to login if not assigned to aplication without user assignement
We want to use Azure AD as the authentication mechanism for our project. To do that, in our organization Azure AD, i have registered an application for our project, added the SPA redirect URI. Added the internal users into the same enterprise…

Dillip Kumar
- 1
- 1
0
votes
2 answers
Azure AD B2C with MSAL change redirect url on success
I have a React app which uses MSAL msal-react v1.3.1. I am using loginRedirect method to redirect a predefined user flow configured in Azure B2C for password reset. The current behaviour is that when the password reset is complete it redirects back…

sharifxu
- 25
- 9
0
votes
1 answer
msal-react access token vs id token different expirations time
For authentication, in my application I use the @azure/msal-react library and @azure/msal-browser.
I have noticed that the method that downloads the token acquireTokenSilent() returns both: accessToken and idToken, while the expiration time of these…

xiao
- 3
- 2
0
votes
1 answer
AADSTS9002326: Error on MSAL Auth code flow
I recently migrated my react application from MSAL 1.0(implicit) to MSAL 2.0(Auth code flow). I moved my redirect urls to Single Page Application in azure app registration. But I still get this error. Any guess ? #help #MSAL
AADSTS9002326:…

Muthu
- 21
- 4
0
votes
1 answer
Unable to send signinPolicy inside the Query Params in Azure AD B2C using React JS
I have been trying to integrate my Azure AD B2C Auth Service on frontend using React JS. The problem that I am facing is that I am unable to pass a query params inside the request URL and that is why, the signInPolicy (p) is being passed as null. I…

Abdul Ahad
- 81
- 1
- 9
0
votes
1 answer
set custom code_challenge for loginRedirect in msalBrowser
I use msal-browser package for authentication and trying to set code_challenge to something which I want than the auto generated one by msal-browser.
import * as msal from "@azure/msal-browser";
import pkceChallenge from "pkce-challenge"
const…

Mateen-Hussain
- 718
- 1
- 13
- 29
0
votes
1 answer
Directly redirect to AAD login page on hitting the URL in browser
Using MSAL 2.0 in React we can easily achieve redirect to login page using below methods
Login with pop-up
Login with redirect
But both the methods can be performed on a login/signin button action.
In my case, I want to redirect my React app…

Sheegy
- 103
- 7
0
votes
1 answer
MSAL 2.0 Redirect User to Login Screen Fast
I use below libraries:
"@azure/msal-browser": "^2.16.0",
"@azure/msal-react": "^1.0.1",
I need to redirect the user to login screen without user being able to see any content. How would I be able to do that?
Currently, I have this:
export default…

Reis
- 576
- 1
- 5
- 18
0
votes
1 answer
Is it possible to call Ms Graph API from an Azure AD B2C app using local accounts?
I have created an App under Azure B2C tenant.
The app is using a custom sign-in/sign-up policy to log in to local users.
However, my app has an admin view, where I would want the log-in users to be able to create accounts for whoever needs access…

D.K. Ananias
- 19
- 4
0
votes
1 answer
Can I use my personal (local) account to authenticate into Azure B2C React MSAL app?
I'm trying to use React and Azure B2C to sign-up a local account (using personal emails).
I'm able to sign-up and login using userflows, however, I cannot get active account information from MsGraph API.
GET https://graph.microsoft.com/v1.0/me 401…

D.K. Ananias
- 19
- 4