# Microsoft Entra ID (Azure Active Directory) - Connector Builder

## Connector Information &#x20;

Microsoft Entra ID (Azure Active Directory) is a cloud-based identity and access management solution. It is a directory and identity management service that operates in the cloud and offers authentication and authorization services to various Microsoft services such as Microsoft 365, Dynamics 365, and Microsoft Azure. &#x20;

ASM can connect via the Alemba Connector builder.  The pull of information is controlled by the scheduling option within the System and the security set by your Azure Administrators.&#x20;

{% hint style="warning" %}
**Authentication and Security**

In the Application Registration (for the Microsoft Graph Security), ensure you have application Permissions configured with:

* User.Read.All
* Directory.Read.All

{% endhint %}

## Prerequisites

You must have at least ASM 10.6.5 installed with the connector builder functionality.&#x20;

<figure><img src="https://1375663122-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhlW9jKl7dcDggHAPhNU9%2Fuploads%2FA5Cb42WbFn0wHazztRhg%2Fimage.png?alt=media&#x26;token=db699d83-4675-4338-b56d-4efb99d40540" alt=""><figcaption></figcaption></figure>

## System Access Requirement&#x20;

* Application ID&#x20;
* Client Secret value (not the client secret ID)&#x20;
* Client\_Credentials Access is required &#x20;

## Helpful Links&#x20;

{% embed url="<https://graph.microsoft.com/v1.0/$metadata#users/$entity>" %}

{% embed url="<https://developer.microsoft.com/en-us/graph/graph-explorer>" %}

{% hint style="info" %}
**Known Issue:** Incorrect Data is populated in ASM from Azure AD when using the Connector Builder

**Root Cause:** Enabling "***Display Cached Resource Properties in Search Results***" in the integration settings can cause issues where the cached values are not cleared when a value on the next record is empty or null.

<img src="https://1375663122-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhlW9jKl7dcDggHAPhNU9%2Fuploads%2FK6VoCe3BUMcVQ8xL3PZC%2FScreenshot%202025-02-25%20at%2013.53.26.png?alt=media&#x26;token=46891e76-e4de-4faa-ace9-6a83bb3431cb" alt="" data-size="original">

**Fix:** Disable "Display Cached Resource Properties in Search Results" in the integration settings.&#x20;

{% endhint %}

## Configuring the Connector Builder for Entra ID/Azure Active Directory&#x20;

Below are examples of the parameters you will want to populate in the connector builder for the Entra ID Azure Active Directory mapping.

1. Access the Connector Builder: System Admin>Integration>Connector Builder
2. Click "Add Connector" to add a new connector
3. Enter the details (See sections below for details and examples)
   1. **Connector Builder Name:** Microsoft Entra ID&#x20;
   2. **Authentication Type:** OAuth&#x20;

<figure><img src="https://1375663122-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhlW9jKl7dcDggHAPhNU9%2Fuploads%2FtIopskBTiTKmfYlh3pHj%2FScreenshot%202025-02-25%20at%2011.55.09.png?alt=media&#x26;token=5eae9466-b2b6-479d-bdfa-fcc120c1d260" alt=""><figcaption></figcaption></figure>

<figure><img src="https://1375663122-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhlW9jKl7dcDggHAPhNU9%2Fuploads%2Fa4y1hsqklICuxbt491pZ%2FScreenshot%202025-02-25%20at%2011.56.02.png?alt=media&#x26;token=a44549ee-7f96-48e2-9d83-aee81da61cef" alt=""><figcaption></figcaption></figure>

4. Configure Resource Settings, click the "+" to add a Resource

<figure><img src="https://1375663122-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhlW9jKl7dcDggHAPhNU9%2Fuploads%2FLcvAKMdmVeyud9kVz7PJ%2Fset1.jpg?alt=media&#x26;token=3704802b-f4ad-4c39-8226-2d2a23c10620" alt=""><figcaption></figcaption></figure>

5. Click the "New Resource" Link to expand and enter the details

   <figure><img src="https://1375663122-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhlW9jKl7dcDggHAPhNU9%2Fuploads%2F5BxTLzUqOHHe22zMsAg6%2FScreenshot%202025-02-25%20at%2012.03.07.png?alt=media&#x26;token=5b212442-b9ee-45d3-a1af-7e31441936f4" alt=""><figcaption></figcaption></figure>

   <figure><img src="https://1375663122-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhlW9jKl7dcDggHAPhNU9%2Fuploads%2F4rkbdEnfFq9T0vF0sfnv%2FScreenshot%202025-02-25%20at%2012.04.18.png?alt=media&#x26;token=a9664cf0-218d-48cb-a2df-5d9ab8c9399f" alt=""><figcaption></figcaption></figure>

   1. **Resource Display Name:** User&#x20;
   2. **Resource Id:** user\_1&#x20;
   3. **Resource Category:** Person&#x20;
   4. **Resource Description:** User in Microsoft Entra&#x20;
6. Complete the queries as follows:

<figure><img src="https://1375663122-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhlW9jKl7dcDggHAPhNU9%2Fuploads%2Fdk8KaeV1IVaNssBH5FpA%2FScreenshot%202025-02-25%20at%2012.06.09.png?alt=media&#x26;token=64a78116-e8f0-4c7e-8ffc-1375d64394b7" alt=""><figcaption></figcaption></figure>

<details>

<summary>All</summary>

<img src="https://1375663122-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhlW9jKl7dcDggHAPhNU9%2Fuploads%2FTqiUTbBqi5wR59S4GPgv%2FScreenshot%202025-02-25%20at%2012.07.50.png?alt=media&#x26;token=0d0419cc-4178-45b4-989b-85c88cc04ae9" alt="" data-size="original">

**Query:** All&#x20;

**URL:** v1.0/users?$select=id,createdDateTime,displayName,givenName,department,companyName,streetAddress,surname,city,userType,jobTitle,mail,mobilePhone,officeLocation,postalCode,streetAddress,state,userPrincipalName,accountEnabled &$expand=manager($levels=1;$select=id,displayName,userPrincipalName)&#x20;

**Nested Objects:** value&#x20;

**Paged?** True&#x20;

**Starting Page No:** 0&#x20;

**Page Size:** 100&#x20;

**Next Page Property:** @odata.nextLink&#x20;

</details>

<details>

<summary>Search</summary>

<img src="https://1375663122-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhlW9jKl7dcDggHAPhNU9%2Fuploads%2FAJO3MWL7yPpjQkBjqVnb%2FScreenshot%202025-02-25%20at%2012.08.36.png?alt=media&#x26;token=81511118-fd57-4a92-a5c7-56c8c1a19ac1" alt="" data-size="original">

**Query:** Search&#x20;

**URL:** v1.0/users?$select=id,createdDateTime,displayName,givenName,department,companyName,streetAddress,surname,city,userType,jobTitle,mail,mobilePhone,officeLocation,postalCode,streetAddress,state,userPrincipalName,accountEnabled&$expand=manager($levels=1;$select=id,displayName,userPrincipalName)&$filter=startswith(displayName,'@SEARCHTEXT')&#x20;

**Nested Objects:** value&#x20;

**Paged?** False&#x20;

</details>

<details>

<summary>Retrieve</summary>

<img src="https://1375663122-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhlW9jKl7dcDggHAPhNU9%2Fuploads%2Fitx0IU3yY4Q4etLKUlZS%2FScreenshot%202025-02-25%20at%2012.09.37.png?alt=media&#x26;token=a419174e-f75b-4198-a040-c8a58abbc0a7" alt="" data-size="original">

**Query:** Retrieve&#x20;

URL:v1.0/users/@UNIQUEID?$select=id,createdDateTime,displayName,givenName,department,companyName,streetAddress,surname,city,userType,jobTitle,mail,mobilePhone,officeLocation,postalCode,streetAddress,state,userPrincipalName,accountEnabled&$expand=manager($levels=1;$select=id,displayName,userPrincipalName)&#x20;

**Nested Objects Paged?** False&#x20;

</details>

7. Complete the Resource Details

<figure><img src="https://1375663122-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhlW9jKl7dcDggHAPhNU9%2Fuploads%2F2Zd3xruUx3mxGpfmJWyV%2FScreenshot%202025-02-25%20at%2012.10.09.png?alt=media&#x26;token=78bd3076-ee68-4278-81b5-3f62ba68b63c" alt=""><figcaption></figcaption></figure>

<details>

<summary>Resource Unique Identifier Field</summary>

**Field ID:** id&#x20;

**Data Type:** String&#x20;

</details>

<details>

<summary>Resource Display Field</summary>

**Field ID:** DisplayName&#x20;

**Data Type:** String&#x20;

</details>

<details>

<summary>Resource Last Modified Field</summary>

**Field ID:** createdDateTime&#x20;

**Data Type:** String&#x20;

</details>

8. Setup fields, Click the "New Fieldset" link

<figure><img src="https://1375663122-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhlW9jKl7dcDggHAPhNU9%2Fuploads%2FQpBugtgR5GY9ImnokhGj%2FScreenshot%202025-02-25%20at%2012.13.38.png?alt=media&#x26;token=9d1b3b62-ff43-44cd-a6ed-75122c1a3568" alt=""><figcaption></figcaption></figure>

<details>

<summary>Fieldsets Details</summary>

**Fieldset id:** User Details&#x20;

**Type:** <mark style="color:red;">Mapped\*\*</mark>

{% hint style="danger" %}
Set the field set type for the **User** type to be "Mapped" instead of "Relative" (the default value). This will ensure the cached values are not retained during the scan.&#x20;
{% endhint %}

</details>

9. Add fields to the fieldset, Click the "+" to add a new Field

<figure><img src="https://1375663122-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhlW9jKl7dcDggHAPhNU9%2Fuploads%2FDhYeMiINre9jKPC0cn8u%2FScreenshot%202025-02-25%20at%2012.14.39.png?alt=media&#x26;token=96017d40-492e-4e80-95f2-f21bf384e774" alt=""><figcaption></figcaption></figure>

10. Click the "+" to repeat and add a new row for all fields you need to add to this fieldset

<figure><img src="https://1375663122-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhlW9jKl7dcDggHAPhNU9%2Fuploads%2FdJ6QijZbxHBOwcCWwPne%2FScreenshot%202025-02-25%20at%2012.16.44.png?alt=media&#x26;token=b6411dac-5ff0-4e83-8d37-48183523d192" alt=""><figcaption></figcaption></figure>

<details>

<summary>Fields Details</summary>

#### Field ID: id &#x20;

Field Display: ID&#x20;

Data Type: String&#x20;

#### Field ID: displayName&#x20;

Field Display: Display&#x20;

Data Type: String&#x20;

#### Field ID: createdDateTime&#x20;

Field Display: Created&#x20;

Data Type: String&#x20;

#### Field ID: givenName&#x20;

Field Display: Given Name&#x20;

Data Type: String&#x20;

#### Field ID: department&#x20;

Field Display: Department&#x20;

Data Type: String&#x20;

#### Field ID: surname&#x20;

Field Display: Surname&#x20;

Data Type: String&#x20;

#### Field ID: city&#x20;

Field Display: City&#x20;

Data Type: String&#x20;

#### Field ID: userType&#x20;

Field Display: User Type&#x20;

Data Type: String&#x20;

#### Field ID: jobtitle&#x20;

Field Display: Job Tilte&#x20;

Data Type: String&#x20;

#### Field ID: mail&#x20;

Field Display: Email&#x20;

Data Type: String&#x20;

#### Field ID: mobilePhone&#x20;

Field Display: Mobile Phone&#x20;

Data Type: String&#x20;

#### Field ID: officeLocation&#x20;

Field Display: Office Location&#x20;

Data Type: String&#x20;

#### Field ID: postalCode&#x20;

Field Display: Postal Code&#x20;

Data Type: String&#x20;

#### Field ID: accountEnabled&#x20;

Field Display: Account Enabled&#x20;

Data Type: Boolean&#x20;

#### Field ID: streetAddress&#x20;

Field Display: Street Address&#x20;

Data Type: String&#x20;

#### Field ID: state&#x20;

Field Display: State&#x20;

Data Type: String&#x20;

#### Field ID: userPrincipalName&#x20;

Field Display: User Principal Name&#x20;

Data Type: String&#x20;

#### Field ID: Manager/id&#x20;

Field Display: Manager ID&#x20;

Data Type: String&#x20;

#### Field ID: manager/displayName&#x20;

Field Display: Manager Display Name&#x20;

Data Type: String&#x20;

#### Field ID: manger/userPrincipalName&#x20;

Field Display: Manager User Principal Name&#x20;

Data Type: String&#x20;

#### Field ID: CompanyName&#x20;

Field Display: CompanyName&#x20;

Data Type: String&#x20;

#### Field ID: streetAddress&#x20;

Field Display: streetAddress&#x20;

Data Type: String&#x20;

#### Field ID: telephoneNumber&#x20;

Field Display: Telephone Number&#x20;

Data Type: String&#x20;

#### Field ID: mobile&#x20;

Field Display: Mobile&#x20;

Data Type: String&#x20;

</details>

{% hint style="info" %}
**Link Settings**

This section is not applicable to the AD configuration.  If you need more information about Link Settings, please contact Alemba Support for assistance.
{% endhint %}

11. Save your new Connector
12. Configure your Source
    1. Navigate to System Admin>Integration>Sources
    2. Click the Add icon to add a new source ![](https://1375663122-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhlW9jKl7dcDggHAPhNU9%2Fuploads%2FEwD9fFENFjVyi9jvkuPs%2Fimage.png?alt=media\&token=27c2d5ed-56bd-479d-9afe-c31db3f0ab59)
    3. Select the Connector you just defined, in this example we called it "Connector Builder Test", but yours will likely be some version of *Entra ID\_Azure AD*, etc...

<figure><img src="https://1375663122-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhlW9jKl7dcDggHAPhNU9%2Fuploads%2FMlfly6MsLDphLovDmZIg%2FScreenshot%202025-02-25%20at%2012.30.23.png?alt=media&#x26;token=5a8bb3ae-8f5a-460c-bf45-9e7fa140038e" alt=""><figcaption></figcaption></figure>

13. Complete the Source Properties.

<details>

<summary>Source Properties</summary>

**URL:** <https://graph.microsoft.com&#x20>;

**Test URL:** v1.0/users&#x20;

**Manage Token**: &#x20;

* Tokenname: YourClient Azure AD Token&#x20;
* Grant Type: client\_credentials&#x20;
* Call back URL: <https://yourclienturl.alembacloud.com/production/oauth2callback.htm>&#x20;
* Authorization URL: [https://login.microsoftonline.com/{Azure ](https://login.microsoftonline.com/%7BAzure)Tenant ID}/oauth2/v2.0/authorize&#x20;
* Access Token URL: [https://login.microsoftonline.com/{Azure ](https://login.microsoftonline.com/%7BAzure)Tenant ID}/oauth2/v2.0/token&#x20;
* Client ID: Value from the Azure App Registration&#x20;
* Client Secret: The secret created for the App Registration&#x20;
* Scope: <https://graph.microsoft.com/.default>&#x20;
* State: Any secret value E.g. A complex password&#x20;

</details>

14. [Map Your Fields Under **Resources** ](https://docs.alemba.com/asm/integrate/managing-integration/selecting-fields-for-mapping)&#x20;
15. [Set up the integration's **scheduled scan**](https://docs.alemba.com/asm/integrate/managing-integration/managing-the-federated-cmdb/managing-scheduled-integration-scans)

&#x20;
