Configure SAML and SCIM with Microsoft Entra ID and IAM Identity Center
AWS IAM Identity Center supports integration with Security Assertion Markup Language (SAML) 2.0 as well as automatic provisioning (synchronization) of user and group information from Microsoft Entra ID (formerly known as Azure Active Directory or Azure AD) into IAM Identity Center using the System for Cross-domain Identity Management (SCIM) 2.0 protocol. For more information, see Using SAML and SCIM identity federation with external identity providers.
Objective
In this tutorial, you will set up a test lab and configure a SAML connection and SCIM provisioning between Microsoft Entra ID and IAM Identity Center. During the initial preparation steps, you'll create a test user (Nikki Wolf) in both Microsoft Entra ID and IAM Identity Center which you'll use to test the SAML connection in both directions. Later, as part of the SCIM steps, you'll create a different test user (Richard Roe) to verify that new attributes in Microsoft Entra ID are synchronizing to IAM Identity Center as expected.
Prerequisites
Before you can get started with this tutorial, you'll first need to set up the following:
-
A Microsoft Entra ID tenant. For more information, see Quickstart: Set up a tenant
in Microsoft documentation. -
An AWS IAM Identity Center-enabled account. For more information, see Enable IAM Identity Center in the AWS IAM Identity Center User Guide.
Considerations
The following are important considerations about Microsoft Entra ID that can affect how you plan to implement automatic provisioning with IAM Identity Center in your production environment using the SCIM v2 protocol.
Automatic Provisioning
Before you begin deploying SCIM, we recommend that you first review Considerations for using automatic provisioning.
Attributes for access control
Attributes for access control is used in permission policies that determine who in your identity source can access your AWS resources. If an attribute is removed from a user in Microsoft Entra ID, that attribute will not be removed from the corresponding user in IAM Identity Center. This is a known limitation in Microsoft Entra ID. If an attribute is changed to a different (non-empty) value on a user, that change will be synchronized to IAM Identity Center.
Nested Groups
The Microsoft Entra ID user provisioning service can't read or provision users in nested groups. Only
users that are immediate members of an explicitly assigned group can be read and provisioned.
Microsoft Entra ID doesn't recursively unpack the group memberships of indirectly assigned users or groups
(users or groups that are members of a group that is directly assigned). For more information,
see Assignment-based scoping
Dynamic Groups
The Microsoft Entra ID user provisioning service can read and provision users in dynamic groups
For example, if Microsoft Entra ID structure for dynamic groups is as follows:
-
Group A with members ua1, ua2
-
Group B with members ub1
-
Group C with members uc1
-
Group K with a rule to include members of Group A, B, C
-
Group L with a rule to include members Group B and C
After the user and group information is provisioned from Microsoft Entra ID into IAM Identity Center through SCIM, the structure will be as follows:
-
Group A with members ua1, ua2
-
Group B with members ub1
-
Group C with members uc1
-
Group K with members ua1, ua2, ub1, uc1
-
Group L with members ub1, uc1
When you configure automatic provisioning using dynamic groups, keep the following considerations in mind.
-
A dynamic group can include a nested group. However, Microsoft Entra ID provisioning service doesn’t flatten the nested group. For example, if you have the following Microsoft Entra ID structure for dynamic groups:
-
Group A is a parent of group B.
-
Group A has ua1 as a member.
-
Group B has ub1 as a member.
-
The dynamic group that includes Group A will only include the direct members of group A (that is, ua1). It won’t recursively include members of group B.
-
Dynamic groups can’t contain other dynamic groups. For more information, see Preview limitations
in the Microsoft documentation.
Step 1: Prepare your Microsoft tenant
In this step, you will walk through how to install and configure your AWS IAM Identity Center enterprise application and assign access to a newly created Microsoft Entra ID test user.
Step 1.1: Set up the AWS IAM Identity Center enterprise application in Microsoft Entra ID
In this procedure, you install the AWS IAM Identity Center enterprise application in Microsoft Entra ID. You will need this application later to configure your SAML connection with AWS.
-
Sign in to the Microsoft Entra admin center
as at least a Cloud Application Administrator. -
Navigate to Identity > Applications > Enterprise applications, and then choose New application.
-
On the Browse Microsoft Entra Gallery page, enter
AWS IAM Identity Center
in the search box. -
Select AWS IAM Identity Center from the results.
-
Choose Create.
Step 2: Prepare your AWS account
In this step, you'll walk through how to use IAM Identity Center to configure access permissions (via permission set), manually create a corresponding Nikki Wolf user, and assign her the necessary permissions to administer resources in AWS.
Step 2.1: Create a RegionalAdmin permission set in IAM Identity Center
This permission set will be used to grant Nikki the necessary AWS account permissions required to manage Regions from the Account page within the AWS Management Console. All other permissions to view or manage any other information for Nikki's account is denied by default.
-
Open the IAM Identity Center console
. -
Under Multi-account permissions, choose Permission sets.
-
Choose Create permission set.
-
On the Select permission set type page, select Custom permission set, and then choose Next.
-
Select Inline policy to expand it, and then create a policy for the permission set using the following steps:
-
Choose Add new statement to create a policy statement.
-
Under Edit statement, select Account from the list, and then choose the following checkboxes.
-
ListRegions
-
GetRegionOptStatus
-
DisableRegion
-
EnableRegion
-
-
Next to Add a resource, choose Add.
-
On the Add resource page, under Resource type, select All Resources, and then choose Add resource. Verify that your policy looks like the following:
{ "Statement": [ { "Sid": "Statement1", "Effect": "Allow", "Action": [ "account:ListRegions", "account:DisableRegion", "account:EnableRegion", "account:GetRegionOptStatus" ], "Resource": [ "*" ] } ] }
-
-
Choose Next.
-
On the Specify permission set details page, under Permission set name, enter
RegionalAdmin
, and then choose Next. -
On the Review and create page, choose Create. You should see RegionalAdmin displayed in the list of permission sets.
Step 3: Configure and test your SAML connection
In this step, you configure your SAML connection using the AWS IAM Identity Center enterprise application in Microsoft Entra ID together with the external IdP settings in IAM Identity Center.
Step 3.1: Collect required service provider metadata from IAM Identity Center
In this step, you will launch the Change identity source wizard from within the IAM Identity Center console and retrieve the metadata file and the AWS specific sign-in URL you'll need to enter when configuring the connection with Microsoft Entra ID in the next step.
-
In the IAM Identity Center console
, choose Settings. -
On the Settings page, choose the Identity source tab, and then choose Actions > Change identity source.
-
On the Choose identity source page, select External identity provider, and then choose Next.
-
On the Configure external identity provider page, under Service provider metadata, choose Download metadata file to download the XML file.
-
In the same section, locate the AWS access portal sign-in URL value and copy it. You will need to enter this value when prompted in the next step.
-
Leave this page open, and move to the next step (
Step 3.2
) to configure the AWS IAM Identity Center enterprise application in Microsoft Entra ID. Later, you'll return to this page to complete the process.
Step 4: Configure and test your SCIM
synchronization
In this step, you will set up automatic provisioning (synchronization) of user information from Microsoft Entra ID into IAM Identity Center using the SCIM v2.0 protocol. You configure this connection in Microsoft Entra ID using your SCIM endpoint for IAM Identity Center and a bearer token that is created automatically by IAM Identity Center.
When you configure SCIM synchronization, you create a mapping of your user attributes in Microsoft Entra ID to the named attributes in IAM Identity Center. This causes the expected attributes to match between IAM Identity Center and Microsoft Entra ID.
The following steps walk you through how to enable automatic provisioning of users that primarily reside in Microsoft Entra ID to IAM Identity Center using the IAM Identity Center app in Microsoft Entra ID.
Step 4.1: Create a second test user in Microsoft Entra ID
For testing purposes, you will create a new user (Richard Roe) in Microsoft Entra ID. Later, after you set up SCIM synchronization, you will test that this user and all relevant attributes were synced successfully to IAM Identity Center.
-
In the Microsoft Entra admin center
console, navigate to Identity > Users > All users. -
Select New user, and then choose Create new user at the top of the screen.
-
In User principal name, enter
RichRoe
, and then select your preferred domain and extension. For example, RichRoe@example.org
. -
In Display name, enter
RichRoe
. -
In Password, enter a strong password or select the eye icon to show the password that was auto-generated, and either copy or write down the value that's displayed.
-
Choose Properties, and then provide the following values:
-
First name - Enter
Richard
-
Last name - Enter
Roe
-
Job title - Enter
Marketing Lead
-
Department - Enter
Sales
-
Employee ID - Enter
12345
-
-
Choose Review + create, and then choose Create.
Step 5: Configure ABAC -
Optional
Now that you have successfully configured SAML and SCIM, you can optionally choose to configure attribute-based access control (ABAC). ABAC is an authorization strategy that defines permissions based on attributes.
With Microsoft Entra ID, you can use either of the following two methods to configure ABAC for use with IAM Identity Center.
Configure user attributes in Microsoft Entra ID for access control in IAM Identity Center
In the following procedure, you will determine which attributes in Microsoft Entra ID should be used by IAM Identity Center to manage access to your AWS resources. Once defined, Microsoft Entra ID sends these attributes to IAM Identity Center through SAML assertions. You will then need to Create a permission set in IAM Identity Center to manage access based on the attributes you passed from Microsoft Entra ID.
Before you begin this procedure, you first need to enable the Attributes for access control feature. For more information about how to do this, see Enable and configure attributes for access control.
-
In the Microsoft Entra admin center
console, navigate to Identity > Applications > Enterprise applications and then choose AWS IAM Identity Center. -
Choose Single sign-on.
-
In the Attributes & Claims section, choose Edit.
-
On the Attributes & Claims page, do the following:
-
Choose Add new claim
-
For Name, enter
AccessControl:
. ReplaceAttributeName
AttributeName
with the name of the attribute you are expecting in IAM Identity Center. For example,AccessControl:Department
. -
For Namespace, enter
https://aws.amazon.com/SAML/Attributes
. -
For Source, choose Attribute.
-
For Source attribute, use the drop-down list to choose the Microsoft Entra ID user attributes. For example,
user.department
.
-
-
Repeat the previous step for each attribute you need to send to IAM Identity Center in the SAML assertion.
-
Choose Save.
Assign access to AWS accounts
The following steps are only required to grant access to AWS accounts only. These steps are not required to grant access to AWS applications.
Step 1: IAM Identity Center: Grant Microsoft Entra ID users access to accounts
-
Return to the IAM Identity Center console. In the IAM Identity Center navigation pane, under Multi-account permissions, choose AWS accounts.
-
On the AWS accounts page the Organizational structure displays your organizational root with your accounts underneath it in the hierarchy. Select the checkbox for your management account, then select Assign users or groups.
-
The Assign users and groups workflow displays. It consists of three steps:
-
For Step 1: Select users and groups choose the user that will be performing the administrator job function. Then choose Next.
-
For Step 2: Select permission sets choose Create permission set to open a new tab that steps you through the three sub-steps involved in creating a permission set.
-
For Step 1: Select permission set type complete the following:
-
In Permission set type, choose Predefined permission set.
-
In Policy for predefined permission set, choose AdministratorAccess.
Choose Next.
-
-
For Step 2: Specify permission set details, keep the default settings, and choose Next.
The default settings create a permission set named
AdministratorAccess
with session duration set to one hour. -
For Step 3: Review and create, verify that the Permission set type uses the AWS managed policy AdministratorAccess. Choose Create. On the Permission sets page a notification appears informing you that the permission set was created. You can close this tab in your web browser now.
-
On the Assign users and groups browser tab, you are still on Step 2: Select permission sets from which you started the create permission set workflow.
-
In the Permissions sets area, choose the Refresh button. The
AdministratorAccess
permission set you created appears in the list. Select the checkbox for that permission set and then choose Next.
-
-
For Step 3: Review and submit review the selected user and permission set, then choose Submit.
The page updates with a message that your AWS account is being configured. Wait until the process completes.
You are returned to the AWS accounts page. A notification message informs you that your AWS account has been reprovisioned and the updated permission set applied. When the user sign in they will have the option of choosing the
AdministratorAccess
role.
-
Step 2: Microsoft Entra ID: Confirm Microsoft Entra ID users access to AWS resources
-
Return to the Microsoft Entra ID console and navigate to your IAM Identity Center SAML-based Sign-on application.
-
Select Users and groups and select Add users or groups. You’ll add the user you created in this tutorial in Step 4 to the Microsoft Entra ID application. By adding the user, you’ll allow them to sign-in to AWS. Search for the user you created at Step 4. If you followed this step, it would be
RichardRoe
.
Troubleshooting
For general SCIM and SAML troubleshooting with Microsoft Entra ID, see the following sections:
-
Synchronization issues with Microsoft Entra ID and IAM Identity Center
-
Specific users fail to synchronize into IAM Identity Center from an external SCIM provider
-
Issues regarding contents of SAML assertions created by IAM Identity Center
-
Duplicate user or group error when provisioning users or groups with an external identity provider
Synchronization issues with Microsoft Entra ID and IAM Identity Center
If you are experiencing issues with Microsoft Entra ID users not synchronizing to IAM Identity Center, it might be
due to a syntax issue that IAM Identity Center has flagged when a new user is being added to IAM Identity Center. You
can confirm this by checking the Microsoft Entra ID audit logs for failed events, such as an
'Export'
. The Status Reason for this event will
state:
{"schema":["urn:ietf:params:scim:api:messages:2.0:Error"],"detail":"Request is unparsable, syntactically incorrect, or violates schema.","status":"400"}
You can also check AWS CloudTrail for the failed event. This can be done by searching in the Event History console of CloudTrail using the following filter:
"eventName":"CreateUser"
The error in the CloudTrail event will state the following:
"errorCode": "ValidationException",
"errorMessage": "Currently list attributes only allow single item“
Ultimately, this exception means that one of the values passed from Microsoft Entra ID contained more values than anticipated. The solution is to review the attributes of the user in Microsoft Entra ID, ensuring that none contain duplicate values. One common example of duplicate values is having multiple values present for contact numbers such as mobile, work, and fax. Although separate values, they are all passed to IAM Identity Center under the single parent attribute phoneNumbers.
For general SCIM troubleshooting tips, see Troubleshooting.
Microsoft Entra ID Guest Account Synchronization
If you would like to sync your Microsoft Entra ID guest users to IAM Identity Center, see the following procedure.
Microsoft Entra ID guest users’ email is different than Microsoft Entra ID users. This difference causes issues when attempting to synchronize Microsoft Entra ID guest users with IAM Identity Center. For example, see the following email address for a guest user:
exampleuser_domain.com#
EXT@domain.onmicrosoft.com
.
IAM Identity Center expects the email address of a user to not contain the
EXT@domain
format.
-
Sign in to the Microsoft Entra admin center
and navigate to Identity > Applications > Enterprise applications and then choose AWS IAM Identity Center -
Navigate to the Single Sign On tab in the left pane.
-
Select Edit which appears next to User Attributes & Claims.
-
Select Unique User Identifier (Name ID) following Required Claims.
-
You will create two claim conditions for your Microsoft Entra ID users and guest users:
-
For Microsoft Entra ID users, create a user type for members with source attribute set to
user.userprincipalname
. -
For Microsoft Entra ID guest users, create a user type for external guests with the source attribute set to
user.mail
. -
Select Save and retry signing in as a Microsoft Entra ID guest user.
-
Additional resources
-
For general SCIM troubleshooting tips, see Troubleshooting IAM Identity Center issues.
-
For Microsoft Entra ID troubleshooting, see Microsoft documentation
. -
To learn more about federation across multiple AWS accounts, see Securing AWS accounts with Azure Active Directory Federation
.
The following resources can help you troubleshoot as you work with AWS:
AWS re:Post
- Find FAQs and links to other resources to help you troubleshoot issues. AWS Support
- Get technical support