How to use @Secured annotation with roles present in my database and authorize the azure token in grails application

Osipalli, Premkiran [ON CONTRACT] 0 Reputation points

I am able to configure azure in my grails application and able to authorize the token.

I have a role table in my database and I want to use @Secured annotation with roles in my local database

Azure Spring Apps
Azure Spring Apps
An Azure platform as a service for running Spring Boot applications at cloud scale. Previously known as Azure Spring Cloud.
109 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. MayankBargali-MSFT 68,391 Reputation points

    @Osipalli, Premkiran [ON CONTRACT] Thanks for reaching out. The query is more towards the Spring framework code side rather than specifically towards azure spring apps. I'm not an expert but on a quick search I think you can use Spring Security with Azure AD authentication.

    implementation 'org.springframework.boot:spring-boot-starter-security'
    implementation ''
        tenant-id: <your-tenant-id>
        client-id: <your-client-id>
        client-secret: <your-client-secret>
          allowed-groups: <your-allowed-groups>
    public class SecurityConfig extends WebSecurityConfigurerAdapter {
        private CustomUserDetailsService userDetailsService;
        protected void configure(HttpSecurity http) throws Exception {
        protected void configure(AuthenticationManagerBuilder auth) throws Exception {
    0 comments No comments