title: Validation AZURE Access token in Resource Server
body: <p>I have a scenario in which I need access token from Azure AD for all my resource server API's since it requires to call to Graph API's. As per my knowledge we cannot invoke Graph API using Id Token and it requires Access Token instead. So after successful Authentication from azure SSO, the UI sends access token as bearer header in all my Spring Boot 2 REST API's.</p>
  
  <p>My question is how can I validate the access token against my REST API's. do we have any out of box feature for doing that or do we need to implement custom validation against the access tokens.</p>
  
  <p>Lets say if I have a REST API called get all user groups like as shown below</p>
  
  <pre><code>@PreAuthorize("hasRole('ROLE_ADMIN')")
  public GroupDetailsResponse getAllUserGroups() {
   .....
  }
  </code></pre>
  
  <p>How can I implement the @PreAuthorize using access token.</p>