<iframe src="https://www.googletagmanager.com/ns.html?id=GTM-M74D8PB" height="0" width="0" style="display:none;visibility:hidden">
Loading
Skip to NavigationSkip to Main Content
400 Bad Request invalid_grant with "mismatched_authorization_server" Error
API Access Management
Okta Classic Engine
Okta Identity Engine
Overview

This article explains what can cause the mismatched_authorization_server error to appear in system logs with the /token call with refresh tokens. It also causes an invalid_request error on Postman.

 

mismatched authorization server    

 

Applies To
  • mismatched_authorization_server
  • Authorization servers
  • invalid_request
  • 400 bad request
  • Refresh Tokens
Cause

The error is caused by the /token call with refresh tokens being issued by a different authorization server than the /token call with code. For example, the /token call with refresh tokens was issued by the custom default authorization server, while the /token call with code was issued by a custom-created authorization server, as shown in the following 2 screenshots.

  • /token call with refresh tokens calls was issued by a custom default authorization server:

default authorization server

 

  • /token call with refresh tokens calls was issued by a custom-created authorization server:

custom authorization server

 

 

In System Log, if the mismatched_authorization_server error is expanded > System > Debug Context > Debug Data, the authorization server ID will be present.

mismatched_authorization_server

 

Solution

The solution is to ensure that the same authorization server that is used in the first /token request (to receive the refresh token) is being used in subsequent /token requests, using that refresh token to get new tokens.

Loading
400 Bad Request invalid_grant with "mismatched_authorization_server" Error