Configure Azure AD as Identity provider OIC in Keycloack and email attribute - azure-active-directory

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:

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.

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

Related

Azure AD B2C Claims do not include mapped Custom IdP claims

I have Azure AD B2C directory and have added our other separate Azure AD (AAD) as an Identity Provider (as Open ID Connect Provider) in Azure AD B2C. I am able to sign in just fine using the custom IdP which links to AAD.
I also have Identity provider claims mapping set as "User ID" to oid, "Display name" to name, "Given name" to given_name, "Surname" to family_name and "Email" to preferred_name (per following link). But when I get the token back and inspect it using https://jwt.ms/, it does not have those claims. When I inspected the "idp_access_token" claim and it has oid, given_name, family_name etc. returned by AAD. I'm not sure where I'm missing. I want these claims to be in the token issued by B2C.
Any help is appreciated.
https://learn.microsoft.com/en-us/azure/active-directory-b2c/identity-provider-azure-ad-single-tenant?pivots=b2c-user-flow
I have selected all of these "Application Claims" in my user flow
You probably missed a step: Configuring optional claims.

Change Email signature for in Azure AD B2C

I'd like to know how to change the signature and the "company name" when using Custom policies for the email received from Azure, such as the one to verify the code?
Please, check the image below, where it says "Here"
Thank you.
Go into azure portal - select your AAD b2c directory.
Select azure ad blade, properties, and change the tenant name.

Azure AD - Keycloak - Kibana Single-Sign on (SSO) User/Group Role mapping

I have setup Single-Sign on (SSO) using keycloak and saml/OpenID broking between a web application (using Kibana for testing) and IDP Azure AD.
Created few users and groups in Azure AD. Also configured attribute mapping to map the user/group roles from Azure AD to keycloak by following the below link,
https://keycloak.discourse.group/t/getting-groups-from-azure-active-directory-idp/590
I need to map the same user/groups roles to Kibana application as well. My requirement is while a user logs into Kibana using the Azure AD - Keycloak Single-Sign On authentication, he should be able to login using the same Azure AD user/group privileges, So there is no need to create separate user/group roles in Kibana.
Is it possible to configure it? Please suggest.
What you are looking for is group claim.
For group claim, you could add the users into different security Groups and include Groups claim in your token. You just need to modify the "groupMembershipClaims" field in application manifest:
"groupMembershipClaims": "SecurityGroup"
Then the token will contain the Ids of the groups that the use belongs to like below :
{
"groups": ["{group id}"]
}
App role can implement the same thing for you.

Multiple domains sync to Azure AD

lets say I have two on-premise domains (DomainA.org, domainB.org) and one tenant (domainA.onmicrosoft.com). Both domains are sync thanks to Azure AD Connect, so user from domainA can log to office.com, there is no problem. Hoever user from domainB getting this "Error validating credentials due to invalid username or password.", and when I changed password from portal.office.com for this user from domainB. I can log with this new password, but only to office365 services, its not sync to On-prem.
And another wierd thing is, that I cant change password for users from domainA.
Do You know where the problem is?
Thanks
I understand you have synced your 2 domains to Azure AD through Azure AD connect . Initially you have registered both the domain in Azure AD and verified both. Kindly check what kind of authentication you were using for Domain A since you were not able to change the password from Azure End. If you have federated that domain it is not possible to change from the cloud. If you were using password hash synchronization then the authentication will happen if cloud and you can change for managed domain.
I request you to go through this article about password writeback . When you are getting an error message while logging before resetting the password kindly note the correlation ID and time stamp and need to get a support ticket since it will be due to multiple reasons.

Missing Username on users signed-up with custom identity providers

In recent months, we've managed to integrate our existing Identity Server 3 with AAD B2C. It's of course registered as a Custom Identity Provider by following this instructions. And everything works fine when it comes to authentication itself. All users from our existing database (which is behind our Identity Server 3) are able to sign-in with AAD B2C without any problem. And as you can guess all of them, once they sign-in for a first time, become Azure Active Directory (B2C Tenant) users as well.
But, we've just recently also noticed that none of them has correct User Name and Source values in the list of users in our AAD B2C Tenant (see picture).
Does anybody have any idea what we might be missing on either Identity Server or Azure AD B2C side (or both) and what could be a possible reason for not-populating these values?
When a User object for an external identity (e.g. an IdentityServer-managed identity) is created in the Azure AD B2C directory, it is created as follows:
{
"accountEnabled": false,
"creationType": null,
...
"userIdentities": [
{
"issuer": "...",
"issuerUserId": "..."
}
]
}
where the UserIdentity object is set as follows:
The issuer property is set to the string representation of the external identity provider that issued the user identifier, such as https://myidentityserver3.azurewebsites.net/identity.
The issuerUserId property is set to the Base64 representation of the user identifier that is issued by the external identity provider.
When the All Users menu is opened in the Azure AD B2C portal, then these external users are listed with the issuer value in the User Name column and "Unknown" in the Source column.

Resources