Microsoft Entra ID

Configure Harness for automatic user provisioning with Microsoft Entra ID

In brief

Learn how to configure Microsoft Entra ID to automatically provision and deprovision user accounts to Harness.

Documentation change


Configure Harness for automatic user provisioning with Microsoft Entra ID

In this article, you learn how to configure Microsoft Entra ID to automatically provision and deprovision users or groups to Harness.

This article explains how to configure Microsoft Entra ID to automatically provision and deprovision users or groups to Harness. Automatic provisioning eliminates manual user management by synchronizing user lifecycle changes from your identity provider to Harness.

Prerequisites

The scenario outlined in this article assumes that you already have the following prerequisites:

The scenario outlined in this article assumes that you have the following prerequisites:

[!INCLUDE common-prerequisites.md]

Assign users to Harness

Microsoft Entra ID uses a concept called assignments to determine which users should receive access to selected apps. In the context of automatic user provisioning, only the users or groups that have been assigned to an application in Microsoft Entra ID are synchronized.

Before you configure provisioning, you must assign users or groups to the Harness application in Microsoft Entra ID. Microsoft Entra ID uses assignments to determine which users should receive access to selected applications. In the context of automatic user provisioning, only the users or groups that have been assigned to an application in Microsoft Entra ID are synchronized.

Before you configure and enable automatic user provisioning, decide which users or groups in Microsoft Entra ID need access to Harness. You can then assign these users or groups to Harness by following the instructions in Assign a user or group to an enterprise app.

Important tips for assigning users to Harness

  • We recommended that you assign a single Microsoft Entra user to Harness to test the automatic user provisioning configuration. Additional users or groups can be assigned later.

Recommendations for user assignment

Start with a small test group before you roll out provisioning to your entire organization. Assign a single Microsoft Entra user to Harness to test the automatic user provisioning configuration. After you verify that provisioning works correctly, you can assign additional users or groups.

When you assign a user to Harness, you must select a valid application-specific role (if available) in the Assignment dialog box. Users with the Default Access role are excluded from provisioning.

If you currently have a Harness App Integration setup in Microsoft Entra ID and are now trying to set up one for Harness, ensure that the user information is also included in the App Integration before you attempt to log into Harness through SSO.

  • When you assign a user to Harness, you must select any valid application-specific role (if available) in the Assignment dialog box. Users with the Default Access role are excluded from provisioning.
  • If you currently have a Harness FirstGen App Integration setup in Microsoft Entra ID and are now trying to set up one for Harness NextGen, make sure the user information is also included in the FirstGen App Integration before attempting to log into Harness NextGen through SSO.

Set up Harness for provisioning

  1. Sign in to your Harness Admin Console, and then go to Continuous Security > Access Management.
![Harness Admin Console](media/harness-provisioning-tutorial/admin.png)

You must generate a SCIM API token in Harness before you can configure provisioning in Microsoft Entra ID. This token allows Microsoft Entra ID to securely connect to the Harness SCIM endpoint and provision users.

  1. Select API Keys.
![Harness API Keys link](media/harness-provisioning-tutorial/apikeys.png)
  1. Sign in to your Harness Admin Console, select your profile at the bottom left corner of the page, and go to Profile Overview.
  1. Select Add API Key.
![Harness Add API Key link](media/harness-provisioning-tutorial/addkey.png)

Screenshot of the Harness Admin Console with the profile menu used to open Profile Overview.

  1. In the Add Api Key pane, do the following:
![Harness Add Api Key pane](media/harness-provisioning-tutorial/title.png)

a. In the Name box, provide a name for the key.
b. In the Permissions Inherited from drop-down list, select an option.

  1. Select Submit.
  1. Under My API Keys, select +API Key. The window to create an API key opens.

    Screenshot of the Harness Profile Overview page showing the +API Key button under My API Keys.

  2. Specify a Name and select Save. Harness creates an API key for your account.

  1. Copy the Key for later use in this article.
![Harness Create Token](media/harness-provisioning-tutorial/token.png)

Screenshot of the Harness new API key dialog with the Name box and Save button.

  1. To create a token for your API key, select +Token under your newly created API key.

    a. Provide a name and select Generate token.

    b. Copy the token value to a safe location. You'll need this token to configure the connection in Microsoft Entra ID.

    c. Select Close.

    Screenshot of the Harness token dialog showing the Generate token and Close buttons.

Add Harness from the gallery

Before you configure Harness for automatic user provisioning with Microsoft Entra ID, you need to add Harness from the Microsoft Entra application gallery to your list of managed SaaS applications.

You must add the Harness application from the Microsoft Entra application gallery before you can configure automatic user provisioning. This registers Harness as a managed SaaS application in your Microsoft Entra tenant.

  1. Sign in to the Microsoft Entra admin center as at least a Cloud Application Administrator.
  2. Browse to Entra ID > Enterprise apps.
![The "All applications" link](common/enterprise-applications.png)

The "All applications" link

  1. To add a new application, select the New application button at the top of the pane.
![The "New application" button](common/add-new-app.png)

The "New application" button

  1. In the search box, enter Harness, select Harness in the results list, and then select the Add button to add the application.
![Harness in the results list](common/search-new-app.png)

Configure automatic user provisioning to Harness

Screenshot of the Microsoft Entra gallery search results with Harness selected and the Add button.

Configure automatic user provisioning to Harness

After you add Harness from the gallery and generate a SCIM token, you can configure the provisioning connection. This section walks through the steps to configure the Microsoft Entra provisioning service to create, update, and disable users or groups in Harness based on user or group assignments in Microsoft Entra ID.

This section guides you through the steps to configure the Microsoft Entra provisioning service to create, update, and disable users or groups in Harness based on user or group assignments in Microsoft Entra ID.

To configure automatic user provisioning for Harness in Microsoft Entra ID, do the following:

  1. Sign in to the Microsoft Entra admin center as at least a Cloud Application Administrator.
  2. Browse to Entra ID > Enterprise apps.
![Enterprise applications blade](common/enterprise-applications.png)

Enterprise applications blade

  1. In the applications list, select Harness.
![The Harness link in the applications list](common/all-applications.png)

The Harness link in the applications list

  1. Select the Provisioning tab.
![Provisioning tab](common/provisioning.png)
  1. Set + New configuration.

Provisioning tab

  1. Select + New configuration.

    Screenshot of Provisioning tab automatic.

![Screenshot of Provisioning tab automatic.](common/application-provisioning.png)
  1. Under Admin Credentials, do the following:
![Tenant URL + Token](common/provisioning-testconnection-tenanturltoken.png)
  • In the Tenant URL box, enter https://app.harness.io/gateway/api/scim/account/<your_harness_account_ID>. You can obtain your Harness account ID from the URL in your browser when you're logged into Harness.
  • In the Secret Token box, enter the SCIM Authentication Token value that you saved in step 6 of the "Set up Harness for provisioning" section.

  • Select Test Connection to ensure that Microsoft Entra ID can connect to Harness. If the connection fails, ensure that your Harness account has Admin permissions, and then try again.

Tenant URL + Token

  * In the **Tenant URL** box, enter **`https://app.harness.io/gateway/api/scim/account/<your_harness_account_ID>`**. You can obtain your Harness account ID from the URL in your browser when you are logged into Harness.

  * In the **Secret Token** box, enter the SCIM Authentication Token value that you saved in step 3 of the "Set up Harness for provisioning" section.

  * Select **Test Connection** to ensure that Microsoft Entra ID can connect to Harness. If the connection fails, ensure that your Harness account has *Admin* permissions, and then try again.


     ![Screenshot of Provisioning test connection.](common/provisioning-test-connection.png)

Screenshot of Provisioning test connection.

  1. Select Create to create your configuration.
  1. Select Create to create your configuration.

  1. Select Properties in the Overview page.
  1. Select Properties in the Overview page.
  1. Select the pencil to edit the properties. Enable notification emails and provide an email to receive quarantine emails. Enable accidental deletions prevention. Select Apply to save the changes.

Screenshot of Provisioning properties.

  1. Select Attribute Mapping in the left panel and select users.
  1. Review the user attributes that are synchronized from Microsoft Entra ID to Harness in the Attribute Mapping section. The attributes selected as Matching properties are used to match the user accounts in Harness for update operations. Select the Save button to commit any changes.
![Harness user "Attribute Mappings" pane](media/harness-provisioning-tutorial/userattributes.png)

Harness user "Attribute Mappings" pane

  1. Under Mappings, select Synchronize Microsoft Entra groups to Harness.
  1. Review the user attributes that are synchronized from Microsoft Entra ID to Harness in the Attribute Mapping section. The attributes selected as Matching properties are used to match the user accounts in Harness for update operations. Select the Save button to commit any changes.
![Harness group "Attribute Mappings" pane](media/harness-provisioning-tutorial/groupattributes.png)
  1. Review the group attributes that are synchronized from Microsoft Entra ID to Harness in the Attribute Mapping section. The attributes selected as Matching properties are used to match the groups in Harness for update operations. Select the Save button to commit any changes.

    Harness group "Attribute Mappings" pane

  1. To configure scoping filters, refer to the following instructions provided in the Scoping filter article.
  1. Use on-demand provisioning to validate sync with a small number of users before deploying more broadly in your organization.
  1. When you're ready to provision, select Start Provisioning from the Overview page.
  1. Use on-demand provisioning to validate sync with a small number of users before deploying more broadly in your organization.

  2. When you are ready to provision, select Start Provisioning from the Overview page.

Monitor your deployment

Additional resources

After you start provisioning, monitor the provisioning logs to verify that users and groups sync correctly between Microsoft Entra ID and Harness.

[!INCLUDE monitor-deployment.md]