Tutorial: Azure Active Directory integration with Amazon Web Services (AWS)

In this tutorial, you learn how to integrate Amazon Web Services (AWS) with Azure Active Directory (Azure AD).

Integrating Amazon Web Services (AWS) with Azure AD provides you with the following benefits:

  • You can control in Azure AD who has access to Amazon Web Services (AWS)
  • You can enable your users to automatically get signed-on to Amazon Web Services (AWS) (Single Sign-On) with their Azure AD accounts
  • You can manage your accounts in one central location - the Azure portal

If you want to know more details about SaaS app integration with Azure AD, see What is application access and single sign-on with Azure Active Directory.

Prerequisites

To configure Azure AD integration with Amazon Web Services (AWS), you need the following items:

  • An Azure AD subscription
  • Amazon Web Services (AWS) single-sign on enabled subscription
Note

To test the steps in this tutorial, we do not recommend using a production environment.

To test the steps in this tutorial, you should follow these recommendations:

  • You should not use your production environment, unless this is necessary.
  • If you don't have an Azure AD trial environment, you can get an one-month trial here.

Scenario description

In this tutorial, you test Azure AD single sign-on in a test environment. The scenario outlined in this tutorial consists of two main building blocks:

  1. Adding Amazon Web Services (AWS) from the gallery
  2. Configuring and testing Azure AD single sign-on

To configure the integration of Amazon Web Services (AWS) into Azure AD, you need to add Amazon Web Services (AWS) from the gallery to your list of managed SaaS apps.

To add Amazon Web Services (AWS) from the gallery, perform the following steps:

  1. In the Azure Portal, on the left navigation panel, click Azure Active Directory icon.

    Active Directory

  2. Navigate to Enterprise applications. Then go to All applications.

    Applications

  3. Click Add button on the top of the dialog.

    Applications

  4. In the search box, type Amazon Web Services (AWS).

    Creating an Azure AD test user

  5. In the results panel, select Amazon Web Services (AWS), and then click Add button to add the application.

    Creating an Azure AD test user

Configuring and testing Azure AD single sign-on

In this section, you configure and test Azure AD single sign-on with Amazon Web Services (AWS) based on a test user called "Britta Simon".

For single sign-on to work, Azure AD needs to know what the counterpart user in Amazon Web Services (AWS) is to a user in Azure AD. In other words, a link relationship between an Azure AD user and the related user in Amazon Web Services (AWS) needs to be established.

This link relationship is established by assigning the value of the user name in Azure AD as the value of the Username in Amazon Web Services (AWS).

To configure and test Azure AD single sign-on with Amazon Web Services (AWS), you need to complete the following building blocks:

  1. Configuring Azure AD Single Sign-On - to enable your users to use this feature.
  2. Creating an Azure AD test user - to test Azure AD single sign-on with Britta Simon.
  3. Creating an Amazon Web Services test user - to have a counterpart of Britta Simon in Amazon Web Services (AWS) that is linked to the Azure AD representation of her.
  4. Assigning the Azure AD test user - to enable Britta Simon to use Azure AD single sign-on.
  5. Testing Single Sign-On - to verify whether the configuration works.

Configuring Azure AD single sign-on

In this section, you enable Azure AD single sign-on in the Azure portal and configure single sign-on in your Amazon Web Services (AWS) application.

To configure Azure AD single sign-on with Amazon Web Services (AWS), perform the following steps:

  1. In the Azure Portal, on the Amazon Web Services (AWS) application integration page, click Single sign-on.

    Configure Single Sign-On

  2. On the Single sign-on dialog, as Mode select SAML-based Sign-on to enable single sign-on.

    Configure Single Sign-On

  3. On the Amazon Web Services (AWS) Domain and URLs section, the user does not have to perform any steps as the app is already pre-integrated with Azure.

    Configure Single Sign-On

  4. On the SAML Signing Certificate section, click Metadata XML and then save the XML file on your computer.

    Configure Single Sign-On

  5. The Amazon Web Services (AWS) Software application expects the SAML assertions in a specific format. Please configure the following claims for this application. You can manage the values of these attributes from the "User Attributes" section on application integration page. The following screenshot shows an example for this.

    Configure Single Sign-On

  6. In the User Attributes section on the Single sign-on dialog, configure SAML token attribute as shown in the image above and perform the following steps:

    Attribute Name Attribute Value Namespace
    RoleSessionName user.userprincipalname https://aws.amazon.com/SAML/Attributes
    Role user.assignedroles https://aws.amazon.com/SAML/Attributes
    Tip

    You need to configure the user provisioning in Azure AD to fetch all the roles from AWS Console. Please refer the provisioning steps below.

    a. Click Add attribute to open the Add Attribute dialog.

    Configure Single Sign-On

    b. In the Name textbox, type the attribute name shown for that row.

    Configure Single Sign-On

    c. From the Value list, type the attribute value shown for that row. Add the Namespace value as given above.

    d. Click Ok.

  7. Click Save button to save the settings on Azure.

    Configure Single Sign-On

  8. In a different browser window, sign-on to your Amazon Web Services (AWS) company site as administrator.

  9. Click Console Home.

    Configure Single Sign-On

  10. Click IAM from Security, Identity & Compliance service.

    Configure Single Sign-On

  11. Click Identity Providers, and then click Create Provider.

    Configure Single Sign-On

  12. On the Configure Provider dialog page, perform the following steps:

    Configure Single Sign-On

    a. As Provider Type, select SAML.

    b. In the Provider Name textbox, type a provider name (e.g.: WAAD).

    c. To upload your downloaded metadata file, click Choose File.

    d. Click Next Step.

  13. On the Verify Provider Information dialog page, click Create.

    Configure Single Sign-On

  14. Click Roles, and then click Create New Role.

    Configure Single Sign-On

  15. On the Set Role Name dialog, perform the following steps:

    Configure Single Sign-On

    a. In the Role Name textbox, type a role name (e.g.: TestUser).

    b. Click Next Step.

  16. On the Select Role Type dialog, perform the following steps:

    Configure Single Sign-On

    a. Select Role For Identity Provider Access.

    b. In the Grant Web Single Sign-On (WebSSO) access to SAML providers section, click Select.

  17. On the Establish Trust dialog, perform the following steps:

    Configure Single Sign-On

    a. As SAML provider, select the SAML provider you have created previously (e.g.: WAAD)

    b. Click Next Step.

  18. On the Verify Role Trust dialog, click Next Step.

    Configure Single Sign-On

  19. On the Attach Policy dialog, click Next Step.

    Configure Single Sign-On

  20. On the Review dialog, perform the following steps:

    Configure Single Sign-On

    a. Click Create Role.

    b. Create as many roles as needed and map them to the Identity Provider.

  21. Now configure the user provisioning to fetch all the roles from AWS

    a. In the AWS Console login with your root account

    b. In the top right corner click your name and then click the My Security Credentials option. This will open up a screen as a warning message. Click the button Security Credentials button to pass the screen.

    Configure Single Sign-On

    Configure Single Sign-On

    c. In the Access Keys section click the Create New Access Key button. This generates the Access Key ID and a token value.

    Configure Single Sign-On

    d. Copy both these values and also download it, so that you don't lose it.

    e. In the Azure Portal, on the Amazon Web Services (AWS) application integration page, click Provisioning.

    Configure Single Sign-On

    f. Set the Provisioning mode to Automatic

    Configure Single Sign-On

    g. Now in the clientsecret and Secret Token paste the corresponding values, which you have copied from AWS Console.

    h. You can click the Test Connection button to test the connectivity. Once that is successful then you can start the provisioning connector.

    Configure Single Sign-On

    i. Now enable the Provisioning Status to On. This starts fetching the roles from the application.

    Configure Single Sign-On

    Note

    Azure AD Provisioning service runs every after some time to sync the roles from AWS. You should see all the Identity Provider attached AWS roles into Azure AD and you can use them while assigning the application to users or groups.

Creating an Azure AD test user

The objective of this section is to create a test user in the Azure portal called Britta Simon.

Create Azure AD User

To create a test user in Azure AD, perform the following steps:

  1. In the Azure portal, on the left navigation pane, click Azure Active Directory icon.

    Creating an Azure AD test user

  2. Go to Users and groups and click All users to display the list of users.

    Creating an Azure AD test user

  3. At the top of the dialog click Add to open the User dialog.

    Creating an Azure AD test user

  4. On the User dialog page, perform the following steps:

    Creating an Azure AD test user

    a. In the Name textbox, type BrittaSimon.

    b. In the User name textbox, type the email address of BrittaSimon.

    c. Select Show Password and write down the value of the Password.

    d. Click Create.

Creating an Amazon Web Services test user

In order to enable Azure AD users to log in to Amazon Web Services (AWS), they must be provisioned into Amazon Web Services (AWS). In the case of Amazon Web Services (AWS), provisioning is a manual task.

To provision a user account, perform the following steps:

  1. Log in to your Amazon Web Services (AWS) company site as administrator.

  2. Click the Console Home icon.

    Configure Single Sign-On

  3. Click Identity and Access Management.

    Configure Single Sign-On

  4. In the Dashboard, click Users, and then click Create New Users.

    Configure Single Sign-On

  5. On the Create User dialog, perform the following steps:

    Configure Single Sign-On

    a. In the Enter User Names textboxes, type Brita Simon's user name (userprincipalname) in Azure AD.

    b. Click Create.

Assigning the Azure AD test user

In this section, you enable Britta Simon to use Azure single sign-on by granting her access to Amazon Web Services (AWS).

Assign User

To assign Britta Simon to Amazon Web Services (AWS), perform the following steps:

  1. In the Azure portal, open the applications view, and then navigate to the directory view and go to Enterprise applications then click All applications.

    Assign User

  2. In the applications list, select Amazon Web Services (AWS).

    Configure Single Sign-On

  3. In the menu on the left, click Users and groups.

    Assign User

  4. Click Add button. Then select Users and groups on Add Assignment dialog.

    Assign User

  5. On Users and groups dialog, select Britta Simon in the Users list.

  6. Click Select button on Users and groups dialog.

  7. On Select Role tab, select the appropriate role for the user. All these roles are shown with the role name and identity provider name. This way you can easily identify the roles from AWS.

  8. Click Assign button on Add Assignment dialog.

Testing single sign-on

In this section, you test your Azure AD single sign-on configuration using the Access Panel.

When you click the Amazon Web Services (AWS) tile in the Access Panel, you should get automatically signed-on to your Amazon Web Services (AWS) application.

Additional resources