How to integrate spring security with Azure OAuth2.0 endpoint ?

Raghavan 0 Reputation points
2024-07-06T03:12:26.2133333+00:00

We are trying to use spring-boot-oauth-resource-server approach to enable authentication and authorization against Azure OAuth. We have registered a client app and create the client secret, scope api endpoints etc. We are also able to generate a token using the OAuth token endpoint - https://login.microsoftonline.com/******/oauth2/v2.0/token

However, when we try to access the endpoint for token verification via the spring boot app, the token validation happens against https://sts.windows.net while the certificate for the endpoint (login.microsoftonline.com) has no SubjectAlternateList for the sts.* or *windows.net and hence fails

Appreciate any pointers or recommendations to resolve the same.

Note: The same spring boot app has been tested with keycloak server as AuthorizationServer and works fine. Problem is while integrate with Azure Authorization endpoint.

Azure App Configuration
Azure App Configuration
An Azure service that provides hosted, universal storage for Azure app configurations.
214 questions
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.
114 questions
{count} votes