react-aad
react-aad copied to clipboard
error=invalid_request&error_description=AADSTS50194
Library versions
react-aad-msal:"^2.3.4"msal: "^1.2.1",
Describe the bug Below is the my configuration import { MsalAuthProvider, LoginType } from "react-aad-msal"; import { Logger, LogLevel } from "msal"; require("dotenv").config();
// Avoid creating an instance inside the component it will be recreated on each render. export const authProvider = new MsalAuthProvider( { auth: { authority: "https://login.microsoftonline.com/common", clientId: process.env.REACT_APP_CLIENT_ID, //redirectUri: process.env.REACT_APP_REDIRECT_URL, postLogoutRedirectUri: window.location.origin, redirectUri: window.location.origin, validateAuthority: true, navigateToLoginRequestUrl: true, }, system: { logger: new Logger( (logLevel, message, containsPii) => { console.log("[MSAL]", message); }, { level: LogLevel.Verbose, piiLoggingEnabled: false, } ), }, cache: { cacheLocation: "sessionStorage", storeAuthStateInCookie: true, }, }, { // Authentication Parameters scopes: ["openid"], }, { // Options loginType: LoginType.Redirect, tokenRefreshUri: window.location.origin + "/auth.html", } );
export const logout = () => { return authProvider.logout(); };
Expected behavior A clear and concise description of what you expected to happen.
To Reproduce It renders the page to Microsoft login .then it again redirects to organization page. One the password enters on the organization page.It again redirects the Microsoft login page
Desktop (please complete the following information):
- OS: windows
- Browser chrome
- Version latest
Smartphone (please complete the following information):
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]
Below i s URL i can see in browser when it redirects. https://xx-xxx-xxx/#error=invalid_request&error_description=AADSTS50194%3a+Application+%27e261a396-fa41-4b0c-9e8e-ae2493300e89%27(xxx-xx-xx)+is+not+configured+as+a+multi-tenant+application.+Usage+of+the+%2fcommon+endpoint+is+not+supported+for+such+applications+created+after+%2710%2f15%2f2018%27.+Use+a+tenant-specific+endpoint+or+configure+the+application+to+be+multi-tenant.%0d%0aTrace+ID%3a+702f7f9c-c618-4b7f-bd3d-8ff3dcf53b00%0d%0aCorrelation+ID%3a+43bf5767-c7fb-46b7-b4d3-99dd2e5e22fe%0d%0aTimestamp%3a+2020-07-10+13%3a41%3a24Z&state=09848a74-c55c-4b9b-9802-9f9202fe8eee