i have a simple spring boot app and i am using these dependencies in my build.gradle.kts for my oauth2 with azure ad:
implementation("org.springframework.boot:spring-boot-starter-oauth2-client:2.4.2") implementation("com.azure.spring:azure-spring-boot-starter-active-directory:3.9.0")
I have a RestController that literally does not much. What it should do is, when i call localhost:8080/ i want azure ad be called and it should return my access token (not in the controller but at least i don't want to get any errors mentioned in the following sentences.).
@GetMapping("/")
fun helloWorld(): String? {
return "Hello Users!"
}
However, in the network tab of chrome, i see that there are several calls happening against login.microsoftonline.com. I even recieve the code in one of those requests. So looking pretty good so far.
The last call however fails and returns the following error:
[invalid_request] AADSTS900144: The request body must contain the following parameter: 'client_id'. Trace ID: XXXXXX Correlation ID: XXXXXX Timestamp: 2021-09-30 13:15:30Z
I don't get it, because in one of the requests mentioned above, the client_id is included. So it gets correctly loaded out of my application.properties. I ofc also set the tenant_id and the secret in the app.props.
On google i could not find anything useful about that error, so i hope you can help me :)
Thanks in advance!