AADSTS7000215 error during refresh token request

Thiyagu 20 Reputation points
2024-09-26T13:02:13.63+00:00

We use oauth2-proxy and azure as an idp. oauth2-proxy uses AAD and v1 version api. User is able to login successfully and during token refresh it is not able to get the refresh token and the following error is thrown.

AADSTS7000215: Invalid client secret provided. Ensure the secret being sent in the request is the client secret value, not the client secret ID, for a secret added to app

It does not happen always and it occurs randomly.

Please help understand is there any configuration from azure could cause this issue.

Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
22,078 questions
{count} votes

Accepted answer
  1. Navya 12,175 Reputation points Microsoft Vendor
    2024-09-27T02:05:07.4566667+00:00

    Hi @Thiyagu

    Thank you for posting this in Microsoft Q&A.

    I understand that you're encountering an AADSTS7000215 error during a refresh token request.

    The error message indicates that you're using the client secret ID instead of the client secret value when trying to acquire a new access token with the refresh token grant flow type.

    To resolve this issue, make sure to use the client secret value, not the client secret ID. Additionally, ensure that the same ClientID and ClientSecret are used that acquired the first refresh token.

    The client secret ID is a unique identifier for the client secret, whereas the client secret value is the actual secret key used for authentication. Using the client secret ID instead of the client secret value will result in an authentication failure, leading to the AADSTS7000215 error.

    User's image

    Hope this helps. Do let us know if you any further queries.

    Thanks,

    Navya.


    If this answers your query, do click Accept Answer and Yes for was this answer helpful. And, if you have any further query do let us know.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

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.