Nov 28 2023 04:37 AM
I am attempting to log in with Microsoft using ReactJS with Client ID and Tenant ID. It is functioning correctly for one of my applications, but it is displaying an error for the other application.
Here is the code I am currently utilizing:
import {
PublicClientApplication,
} from "@azure/msal-browser";
const msalConfig = {
auth: {
clientId: "bd0f7574-xxxx-xxxx-xxxx-xxxxxxx",
authority:
"https://login.microsoftonline.com/c6f6dd74-xxxxx-xxxx-xxxxx-xxxxxx",
redirectUri: window.location.origin,
},
};
const loginRequest = {
scopes: ["openid", "profile", "User.Read"],
};
const msalInstance = new PublicClientApplication(msalConfig);
It's returning following error:
ServerError: invalid_request: 9002326 - [2023-11-03 07:35:52Z]: AADSTS9002326: Cross-origin token redemption is permitted only for the 'Single-Page Application' client-type. Request origin: 'https://www.yello-ai.com'. Trace ID: 0e3d94c4-e3f1-4cba-9eec-f46b80dd5100 Correlation ID: 13311371-6122-4e67-9ff4-54a2b5458fd8 Timestamp: 2023-11-03 07:35:52Z - Correlation ID: 13311371-6122-4e67-9ff4-54a2b5458fd8 - Trace ID: 0e3d94c4-e3f1-4cba-9eec-f46b80dd5100
Could you please let me know which settings need to be adjusted to resolve this issue?
Nov 29 2023 12:39 AM
Please follow this to fix your problem:
https://learn.microsoft.com/en-us/entra/identity-platform/quickstart-register-app
Nov 29 2023 03:39 AM
@Kidd_Ip I have created app with same thing but it didn't solve my problem.