title: OpenID Connect log in in with Office 365 and spring security
body: <p>I need to configure <strong>OpenID Connect</strong> using a <strong>Spring Security</strong> filter to authorize the consumption of my Rest API Web. I found a <a href="http://www.baeldung.com/spring-security-openid-connect" rel="nofollow noreferrer">Google Login Example</a>, but in my case I need it for Office365. I created my app in Azure and I have configured the corresponding properties. When I try to access my REST API it redirects me to the office login and when I enter the correct credentials this exception is thrown: </p>
  
  <p><img src="https://i.stack.imgur.com/2yUXL.png" alt="Image error in console"></p>