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

Jackson Chen 1 Reputation point
2020-03-11T05:23:28.997+00:00

When I was setting my spring boot up with Azure AD service, I download the sample below https://github.com/Azure-Samples/ms-identity-java-webapp
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.
19,381 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. saurabh sharma 76 Reputation points
    2020-03-13T22:35:16.28+00:00

    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
    2020-03-19T23:00:23.127+00:00

    @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.