custom claims in Azure AD to add windows AD groups - active-directory

I would like to know how can I add a windows AD group into a custom claim on Azure AD? I am looking to use AD groups for applications running on a platform that uses role-claims or custom claims to enable applications to have access groups or AD groups separately.

• You can add the custom group claims in a token configuration for your application deployed in Azure AD as follows. Also, since you are adding AD groups, it is considered that those groups are synchronized from on-premises AD through Azure AD Connect to be used as group claims in token configuration.
To configure group claims, go to your configured application in Azure AD  enterprise applications, click on the application and select ‘Single Sign On’  User Attributes & Claims  Add a group claim  Use the radio buttons to select the ‘Security groups’ option as below
To emit groups using Active Directory attributes synced from Active Directory instead of Azure AD objectIDs select the required format from the drop-down. Only groups synchronized from Active Directory will be included in the claims.
To configure the group claim as a custom claim role by giving it a custom claim name, select the box ‘Customize the name of the group claim’ as below while also checking the box ‘Emit groups as role claims’ to use the group as a role claim in your application. Please take into consideration that if the option to emit group data as roles is used, only groups will appear in the role claim. Any Application Roles the user is assigned will not appear in the role claim.
Thus, you can configure AD groups as role claims for an application in Azure AD. Please find the documentation link for reference: -
https://learn.microsoft.com/en-us/azure/active-directory/hybrid/how-to-connect-fed-group-claims#add-group-claims-to-tokens-for-saml-applications-using-sso-configuration

Related

Azure B2C - granting access to multiple “application tenants”

I am building an application which will use Azure B2C as the identity system. It will include some local accounts, and some federated accounts for Enterprise SSO logins.
The application will have “application tenants”, representing customer organization/company.
I’d like a user to be able to grant users access to one or more application tenants (in case some users will manage multiple company accounts within the app).
There will also be multiple roles within the app (e.g. read only, full admin).
What is the recommended way to map a B2C User to “app tenants” and roles?
Create AAD group per tenant and role and check membership?
Custom attribute for tenantid(s)?
Or must I map users to tenants & roles in app DB/ outside of B2C?
Is this scenario described in any docs that might point me in the right direction?
Thanks!

Authorization - mapping a Azure AD group to a Snowflake role

We implemented SSO on Snowflake and with SCIM, we're able to provision users in Snowflake
Now, I want it to work like SQL Server authentication where I can add users to the same AD group and create a single login on SQL Server for this AD group. To revoke login permissions I just remove the user from the AD group. To give a new person access I just add them to it.
I would like also to map a role to a group, so, for instance, if I could link an Azure AD Group to a Snowflake Role [Read-Only User for Database X], as soon as I'm adding a user Y in Azure AD Group, this user Y will have automatically read-only access to Database X
Is it possible ?
Regards,
This same concept is possible in Snowflake as well with SAML SSO (for authorization) and SCIM (to sync users and their corresponding roles to SF). The details for this are here:
https://docs.snowflake.com/en/user-guide/admin-security-fed-auth-configure-idp.html
https://community.snowflake.com/s/article/HOW-TO-Setup-SSO-with-Azure-AD-and-the-Snowflake-New-URL-Format-or-Privatelink
https://docs.snowflake.com/en/user-guide/scim-azure.html
Both these together will ensure that the user created on Azure AD will be possible to login with the AAD credentials and the SCIM will ensure that the relevant role management is on the AAD side which is reflected exactly as-is on the SF side.

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.

Azure AD as SAML Id Provider - How and where to set SP unique identifier

I have an app that supports SAML 2.0. I want to configure Azure AD as Id Provider. I want to store my SP's unique identifiers in Azure AD user profiles. I could not find how to do that.
More specifically, I am able to select any of the user profile attributes as the value for NameId in the SAML response. But I do not want to use Azure AD standard user profile attributes. I could set up user.extensionattribute1 but where can I set the value for this attribute?
Note:
1. I am using trial Azure AD with Office 365 subscription. I am able to set up Azure AD as a SAML-based SSO Id Provider.
1.Navigate to Azure Active Directory > Enterprise applications and select the application from the list.
2.Under the Manage section, select Single sign-on.
3.Select SAML. The Set up Single Sign-On with SAML - Preview page appears.
You can configure User attributes and claims here.
Reference:
https://learn.microsoft.com/en-us/azure/active-directory/manage-apps/configure-single-sign-on-non-gallery-applications

Is it possible to do Role-Group based Authorization without Azure Active directory Premium

When RBAC was introduced in Azure Active directory, roles can be granted to users or collection of users (groups).We followed this blog post and added that functionality for our apps when it first got introduced. But now, we have to go for active directory premium to assign roles to groups and get roles in bearer token.Going with Azure Active directory is not a feasible solution for us as premium is gonna cost us $6 user/ month and we have lot of groups and each group has lot of users. Looking at the costs our IT team is not willing to go for this package. I was just wondering if there an alternative approach for mapping roles to groups. Or this is only doable using premium.
Using Azure Active Directory (Azure AD) with an Azure AD Premium or Azure AD Basic license, you can use groups to assign access to a SaaS application that's integrated with Azure AD( refer here about detail).
So if you want to manage the roles using the group, we need at least the Azure AD Basic license. If you were using the free edition, we can only assign the roles to the users one by one.
Instead using the role manage the access for the application, we can also use the group which also supports for the Azure AD free edition. You can check the code sample about authorization in a web app using Azure AD groups & group claims from here.

Resources