I had verified the publisher and added MPN ID to the app but still getting error as "ADSTS700005: Provided Authorization Code is intended to use against other tenant"

Nibin N 5 Reputation points
2024-04-02T13:49:45.9966667+00:00

I have created an app to validate MS account (Accounts in any organizational directory (Any Azure AD directory - Multitenant) and personal Microsoft accounts (e.g. Skype, Xbox)) and I see an error in App Registrations Starting November 9th, 2020 end users will no longer be able to grant consent to newly registered multitenant apps without verified publishers. Add MPN ID to verify publisher. I have added MPN ID to verify publisher. But now I'm getting an error that "ADSTS700005: Provided Authorization Code is intended to use against other tenant".

Microsoft Security | Microsoft Graph
0 comments No comments
{count} vote

1 answer

Sort by: Most helpful
  1. AsithwMSFT 1,520 Reputation points Microsoft External Staff
    2024-04-21T21:20:28.4633333+00:00

    @Nibin N

    Please verify your TenantId configuration, as the error suggests that a fixed TenantId might be used for the authentication request.

    https://learn.microsoft.com/en-us/entra/identity-platform/reference-error-codes

    InvalidGrantRedeemAgainstWrongTenant - Provided Authorization Code is intended to use against other tenant, thus rejected. OAuth2 Authorization Code must be redeemed against same tenant it was acquired for (/common or /{tenant-ID} as appropriate)

    0 comments No comments

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.