AADSTS7000215: Invalid client secret is provided error only to some users in my application

Rakesh Chandrashekar 0 Reputation points
2025-03-13T08:33:18.19+00:00

I have a website hosted in azure app service which uses graph API to get the outlook events of the customer logged in. There are many customers who login and access the outlook events daily. My issue is that some of the customers are not able to access the outlook events even if they are logged in. For the said customers, I get the below error:

Microsoft.Identity.Client.MsalServiceException: 'A configuration issue is preventing authentication - check the error message from the server for details. You can modify the configuration in the application registration portal. See https://aka.ms/msal-net-invalid-client for details.  Original exception: 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 'my-App-ID'.

I have setup the correct client secret.

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
13,256 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. CarlZhao-MSFT 45,761 Reputation points
    2025-03-13T09:55:43.4533333+00:00

    Hi @Rakesh Chandrashekar

    If the secret is invalid, expired, or contains special characters, it usually results in an "invalid client secret" error. Therefore, please check if your client secret has any of these issues. If it still doesn't work, I recommend generating a new client secret and trying again.

    Additionally, if your app is a public client app, you should not use a client secret, as it is only available for confidential client apps.

    Hope this helps.

    If the reply is helpful, please click Accept Answer and kindly upvote it. If you have additional questions about this answer, please click Comment.

    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.