Mr_Thorynque
Mr_Thorynque

Reputation: 2012

Configure Azure AD as Identity provider OIC in Keycloack and email attribute

I success configuring Azure AD as identity provider using OIC in Keycloack. But it ask email during the first connection with keycloak.

And I can't find how to create the mapper to populate email in keycloack with the one of Azure AD.

I figure that it's the userprincipalname that I get the email.

So I try that without success: enter image description here

Upvotes: 1

Views: 3454

Answers (2)

Rufus
Rufus

Reputation: 1

I had the same issue.

  1. You need to create a new "Flow" in Authentication tab and "Add Execution" then add the Flow : "Create User If Unique".
  2. In Identity Providers tab, you need to change the "First Login Flow" option, and pick the flow you've just created.

Upvotes: 0

juunas
juunas

Reputation: 58873

The UPN claim is upn. With v2 endpoint of AAD, you could also require the email scope and get the email in email claim. UPN and email can be different in some cases.

Upvotes: 1

Related Questions