I am trying to connect a Keycloak Gatekeeper instance to AAD via Open ID Connect. To do so, I am using the v2
endpoint https://login.microsoftonline.com/<tenantID>/v2.0
.
Unfortunately even before I login there is an error in the logs:
unable to verify the id token {"error": "oidc: JWT claims invalid: invalid claim value: 'iss'. expected=https://login.microsoftonline.com/<tenantID>/v2.0, found=https://sts.windows.net/<tenantID>/."}.
I did a little bit of reasearch, and found out that the found=
value is the same as the one returned by the v1
endpoint. This lead me to the conclusion that the application might uses the wrong version. To make sure that it is always using v2
I've added fixed the version of the enpoint by setting "accessTokenAcceptedVersion": 2
in my application registration manifest. Unfortunately this did also not resolve the issue.
So what do I do wrong? Or are the AAD APIs just buggy?