A Microsoft service that provides website owners with tools to monitor, analyze, and optimize their site's performance in Bing search results.
The error message "invalid_grant: Refresh token does not match client" typically indicates that the refresh token you are using is not associated with the client application that is making the request. Here are some potential reasons why this might occur:
- Client ID Mismatch: If the refresh token was issued to a different client ID than the one currently being used, it will result in this error. Ensure that the client ID used in the token request matches the one associated with the refresh token.
- Token Expiration or Revocation: Refresh tokens can be invalidated at any time. If the user has changed their password, removed permissions for your application, or if the refresh token has expired, you may encounter this error. The OAuth specification allows for refresh tokens to be revoked by the authorization server without prior notice.
- Public vs. Confidential Clients: If you are using a public client application (without a client secret), the refresh token may only be valid on the device it was issued. If you attempt to use it from a different device or context, it may lead to this error.
- Configuration Changes: Although you mentioned no configuration changes were made, double-check that the Azure App Registration settings have not been altered, including permissions and redirect URIs.
- Service Issues or Policy Changes: Occasionally, service issues or changes in security policies by Microsoft could affect the validity of tokens. If there have been recent updates or announcements regarding the Bing Webmaster API or Microsoft identity platform, they could provide insights into this issue.
To resolve the issue, you might need to prompt the user to re-authenticate to obtain a new refresh token and ensure that the application is correctly configured to handle the OAuth flow.
References: