title: Failed to validate data received from Authorization service - could not validate state
body: <p>I downloaded <a href="https://github.com/Azure-Samples/ms-identity-java-webapp" rel="nofollow noreferrer">ms-identity-java-webapp</a> archive and updated the application.properties file with the Azure AD details.
  When I started the Spring Boot application, I got a login page. After clicking login button, I got a microsoft login page and after logging in with the user account, I got the following log lines with an error page:</p>
  <pre><code>
  2020-09-23 16:53:06.982 INFO 708 --- [ main] c.m.a.m.MsalWebSampleApplication : Starting MsalWebSampleApplication with PID 708 (C:\Users\testuser\Downloads\ms-identity-java-webapp-master\msal-java-webapp-sample\target\classes started by testuser in C:\Users\testuser\Downloads\ms-identity-java-webapp-master\msal-java-webapp-sample)
  2020-09-23 16:53:06.985 INFO 708 --- [ main] c.m.a.m.MsalWebSampleApplication : No active profile set, falling back to default profiles: default
  2020-09-23 16:53:08.466 INFO 708 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 8080 (http)
  2020-09-23 16:53:08.497 INFO 708 --- [ main] o.apache.catalina.core.StandardService : Starting service [Tomcat]
  2020-09-23 16:53:08.497 INFO 708 --- [ main] org.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/9.0.17]
  2020-09-23 16:53:08.646 INFO 708 --- [ main] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
  2020-09-23 16:53:08.647 INFO 708 --- [ main] o.s.web.context.ContextLoader : Root WebApplicationContext: initialization completed in 1613 ms
  2020-09-23 16:53:08.967 INFO 708 --- [ main] .s.s.UserDetailsServiceAutoConfiguration :
  
  Using generated security password: 970ff480-0c7d-4cd0-b657-000c23a68ab4
  
  2020-09-23 16:53:09.148 INFO 708 --- [ main] o.s.s.web.DefaultSecurityFilterChain : Creating filter chain: any request, [org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter@6813a331, org.springframework.security.web.context.SecurityContextPersistenceFilter@27494e46, org.springframework.security.web.header.HeaderWriterFilter@68105edc, org.springframework.security.web.csrf.CsrfFilter@6e4ea0bd, org.springframework.security.web.authentication.logout.LogoutFilter@3e598df9, org.springframework.security.web.savedrequest.RequestCacheAwareFilter@1e411d81, org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter@75504cef, org.springframework.security.web.authentication.AnonymousAuthenticationFilter@1bd81830, org.springframework.security.web.session.SessionManagementFilter@470a9030, org.springframework.security.web.access.ExceptionTranslationFilter@28782602]
  2020-09-23 16:53:09.373 INFO 708 --- [ main] o.s.s.concurrent.ThreadPoolTaskExecutor : Initializing ExecutorService 'applicationTaskExecutor'
  2020-09-23 16:53:09.561 INFO 708 --- [ main] o.s.b.a.w.s.WelcomePageHandlerMapping : Adding welcome page template: index
  2020-09-23 16:53:09.710 INFO 708 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat started on port(s): 8080 (http) with context path ''
  2020-09-23 16:53:09.715 INFO 708 --- [ main] c.m.a.m.MsalWebSampleApplication : Started MsalWebSampleApplication in 3.211 seconds (JVM running for 4.717)
  2020-09-23 16:53:29.556 INFO 708 --- [nio-8080-exec-1] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring DispatcherServlet 'dispatcherServlet'
  2020-09-23 16:53:29.556 INFO 708 --- [nio-8080-exec-1] o.s.web.servlet.DispatcherServlet : Initializing Servlet 'dispatcherServlet'
  2020-09-23 16:53:29.562 INFO 708 --- [nio-8080-exec-1] o.s.web.servlet.DispatcherServlet : Completed initialization in 6 ms
  
  Failed to validate data received from Authorization service - could not validate state
  
  </code></pre>
  <p>Has anyone faced this issue? How can I resolve this?</p>