I followed the article, https://learn.microsoft.com/en-us/azure/developer/java/spring-framework/configure-spring-boot-starter-java-app-with-azure-active-directory and created an App role The below endpoint uses users role to authorize @CrossOrigin(origins = "http://localhost:8080") @RestController @RequestMapping("/api") public class TutorialController { @Autowired TutorialRepository tutorialRepository; @PreAuthorize("hasAnyAuthority('APPROLE_Admin', 'APPROLE_Contributor')") @GetMapping("/tutorials") public ResponseEntity<List<Tutorial>> getAllTutorials(@RequestParam(required = false) String title)…