Search code examples
javaazure-active-directory

Spring Boot 3 Azure AD


i've updated my Project to Spring Boot 3 and now im confused how to "activate" Azure AD. In Spring Boot 2 i've extended with AADResourceServerWebSecurityConfigurerAdapter and nothing else to do, but since the latest spring security version inheritence is not more possible and @Bean Configuration is now the thing. I'm new to spring boot and found nothing that helped me, tried to find any tutorial but everything i've found still uses the old approach. I have an Angular GUI with PKCE and this app tries to talk with a Spring Boot Backend. In Spring Boot 2 all works fine.

Thanks for every hint or help

Used Dependencies:

<dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-oauth2-client</artifactId>
    </dependency>
    <dependency>
        <groupId>com.azure.spring</groupId>
        <artifactId>azure-spring-boot-starter-active-directory</artifactId>
        <version>4.0.0</version> 
    </dependency>

Solution

  • Spring Boot 3 is compatible with Spring Cloud Azure Starter Active Directory 5.0.0

    You can refer to this documentation