Failed to validate data received from Authorization service - Could not validate state

Jackson Chen 1 Reputation point

When I was setting my spring boot up with Azure AD service, I download the sample below
but it didn't work.

It shows me the error-Failed to validate data received from Authorization service - Could not validate state

Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
20,086 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. saurabh sharma 76 Reputation points

    There might be a possibility that the sample has some issues as I could see there is an ongoing GitHub issue on the sample repository where multiple users are facing similar "could not validate state" error. I am also internally checking with the sample owner on this issue and update you my findings.
    However, can you please refer to the A web app that calls web APIs: Code configuration documentation which provides code snippets to use MSAL in Java.

    0 comments No comments

  2. saurabh sharma 76 Reputation points

    @Jackson Chen I have received the information that this issue may be related to SameSite updates and so, the sample has been updated to handle the SameSite issues. Please let us know if this does not resolve the issues.
    Please take a look at this article to know more about samesite cookie.

    Please "Accept as answer" wherever the information provided helps you to help others in the community.