AADSTS9002327: Tokens issued for the 'Single-Page Application' client-type may only be redeemed via cross-origin request

Debebe, Solomon Aynalem 0 Reputation points
2024-02-28T10:05:01.55+00:00

We have an Microsoft Entra ID App created, using the followings:

  • Platform: Single-page application
  • OIDC-based Sign-on
  • Conditional Access Policies for devices and MFA
  • Auth code flow paired with Proof Key for Code Exchange (PKCE) and OpenID Connect (OIDC) to get access tokens and ID tokens

Trying to generate token using our app returns the following error messages:

Authentication problem: No access token provided from login.microsoftonline.com:400 Bad Request: "{"error":"invalid_request","error_description":"AADSTS9002327: Tokens issued for the 'Single-Page Application' client-type may only be redeemed via cross-origin requests. Trace ID: 46359ff6-d4ca-4e6f-8291-f352afa72300 Correlation ID: 450d31b1-bf1b-4686-91a5-0c0df20d9084 Timestamp: 2024-02-28 10:00:28Z","error_codes":[9002327],"timestamp":"2024-02-28 10:00:28Z","trace_id":"46359ff6-d4ca-4e6f-8291-f352afa72300","correlation_id":"450d31b1-bf1b-4686-91a5-0c0df20d9084"}"

I appreciate your support to solve this problem!

Thanks

Solomon

Microsoft Security | Microsoft Entra | Microsoft Entra ID
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Alfredo Revilla (Personal Account) 391 Reputation points
    2024-02-29T04:00:25.13+00:00

    Usually, you get the AADSTS9002327 error when trying to exchange a refresh token from server-side code. Ensure it's being done exclusively from client-side code.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.