OpenID Connect-Problem mit Azure AD

Yes, we are using KeyCloak and use Azure AD for federation in behind it. It’s correctly bootstrapping the email, so it must do some kind of mapping just like the one you mention.

We have a fix. We were using the v1.0 version of the endpoint. When we switch to the v2.0, it works and we get the email just fine. Thanks for all your help @david, talking it through helps us triage the issue.

Glad to hear it!

Would you be able to describe how to tell whether you’re using v1 or v2 in the azure portal? Then we can add a note to the instructions above so it doesn’t catch anyone else!

Yep, adding /v2.0/ to the metadata document url.

https://login.microsoftonline.com/replace-with-tenant-id/v2.0/.well-known/openid-configuration

Perfect, thanks. I’ve added a note to the OP

Hallo, ich habe ein sehr ähnliches Problem wie der ursprüngliche Poster (OP) hier. Ich authentifiziere mich gegenüber NHS.net, was im Hintergrund Active Directory ist und wahrscheinlich von Azure bereitgestellt wird. Ich verwende das OIDC-Plugin und erhalte folgende Fehlermeldung:

(oidc) Authentication failure! invalid_credentials: OAuth2::Error,
(Der Fehler endet mit einem Komma und enthält keine weiteren Daten, anders als der Fehler des OP)

Ich habe versucht, die Einstellungen für den Autorisierungs- und Token-Scope auf openid email profile zu ändern (diese werden laut Konfigurations-URL-Daten vom OIDC-Endpunkt unterstützt).

Immer noch erhalte ich denselben Fehler in der Benutzeroberfläche: „Entschuldigung, beim Autorisieren Ihres Kontos ist ein Fehler aufgetreten. Bitte versuchen Sie es erneut.