Skip to content

[QUERY] Support needed setting up client credential flow with Spring Boot app #22642

@BillyBolton

Description

@BillyBolton

Query/Question
Question also posted on StackOverflow here.

I'm trying to setup client credential flow with a Spring app to access a web api (both owned by myself). I've attempted to follow the Azure documentation Microsoft identity platform and the OAuth 2.0 client credentials flow and Quickstart: Configure a client application to access a web API but I'm running into a few problems because the documentation is not clear. Somewhere in my setup, Azure is forcing the user to sign-in, and then other error messages sprout from there. As we know, however, client credential should be machine to machine authorization so I'm not sure why this sign-in flow is happening.

Below are some photos of my setup from Azure and the applications.yml file. Any feedback would be helpful getting me up running.

application.yml

 azure:
  activedirectory:
    tenant-id: {my-web-app-tenant-id}
    client-id: {my-web-app-client-id}
    client-secret: {my-web-app-client-secret}
    authorization-clients:
     web-api:
       scopes:
         - api://example-api/Employees.Read.All
         - api://example-api/Employees.Write.All

Web-app and web-api registered applications

Web-api scopes and authorized client which matches web-app client

Web-app authentication setup

Web-App permissions, including permission for web-api

Why is this not a Bug or a feature Request?
A clear explanation of why is this not a bug or a feature request?

Setup (please complete the following information if applicable):

  • OS: Ubuntu 20.10
  • IDE: Visual Studio Code
  • Library/Libraries:
  • com.azure.spring:azure-spring-boot-starter-active-directory:3.5.0
  • org.springframework.boot:spring-boot-starter-oauth2-client

Information Checklist
Kindly make sure that you have added all the following information above and checkoff the required fields otherwise we will treat the issuer as an incomplete report

  • Query Added
  • Setup information Added

Metadata

Metadata

Assignees

Labels

ClientThis issue points to a problem in the data-plane of the library.azure-springAll azure-spring related issuesazure-spring-aadSpring active directory related issues.customer-reportedIssues that are reported by GitHub users external to the Azure organization.questionThe issue doesn't require a change to the product in order to be resolved. Most issues start as that

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions