# Microsoft Intune - Connector Builder

## Connector Information &#x20;

Microsoft Intune is a Microsoft cloud-based unified endpoint management service for both corporate and BYOD devices. It extends some of the "on-premises" functionality of Microsoft Endpoint Configuration Manager to the Microsoft Azure cloud. &#x20;

ASM can connect via the Alemba Connector builder.  The pull of information is controlled by the scheduling option within the System Administration>Integration>Scheduling option, and the security set by your Azure Administrators. This allows for your full control of when you would like to update the information in ASM.

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

In the Application Registration (for the Microsoft Graph Security), ensure you have application Permissions configured to allow creation, update and management of resources.  The following is required:

* DeviceManagementManaged
* Devices.Read.All&#x20;
* Offline\_Access
  {% 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%2FoMk2Uv8x4AgcGJ1Ryowz%2Fimage.png?alt=media&#x26;token=353a7f13-7931-49e1-bbed-939f3e51c1ee" alt=""><figcaption></figcaption></figure>

## System Access Requirement&#x20;

* Application ID&#x20;
* Client Secret value (not the client secret ID)&#x20;
* DeviceManagementManaged, Devices.Read.All and offline\_acces is required

## Helpful Links&#x20;

<https://learn.microsoft.com/en-us/mem/intune/developer/reports-ref-devices> &#x20;

<https://learn.microsoft.com/en-us/graph/intune-concept-overview> &#x20;

<https://developer.microsoft.com/en-us/graph/graph-explorer> &#x20;

## Configuring the Connector Builder for Microsoft Intune

Below are examples of the parameters you will want to populate in the connector builder for the Microsoft Intune 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 Intune&#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:** Intune Device&#x20;
   2. **Resource Id:** InTuneDevice
   3. **Resource Category:** CMDB Item
   4. **Resource Description:** Microsoft Intune
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/deviceManagement/managedDevices?$top=@PAGESIZE

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

**Paged?** True&#x20;

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

**Page Size:** 500&#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/deviceManagement/managedDevices?$filter=startswith(deviceName,'@SEARCHTEXT')&$top=@PAGESIZE

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

**Paged?** True&#x20;

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

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

**Next Page Property:** @odata.nextLink

</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/deviceManagement/managedDevices/@UNIQUEID?$select=id,deviceName,azureADDeviceId,serialNumber,phoneNumber,complianceState,operatingSystem,osVersion,model,manufacturer,lastSyncDateTime,totalStorageSpaceInBytes,freeStorageSpaceInBytes,imei,iccid,wiFiMacAddress,ethernetMacAddress,enrolledDateTime,isEncrypted,isSupervised,subscriberCarrier,userPrincipalName,managedDeviceOwnerType,physicalMemoryInBytes

**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:** DeviceName&#x20;

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

</details>

<details>

<summary>Resource Last Modified Field</summary>

**Field ID:** lastsyncDateTime

**Data Type:** DateTime

</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:** DeviceFields&#x20;

**Type:** Relative &#x20;

</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>

<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>

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

<details>

<summary>Fields Details</summary>

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

Field Display: Device ID&#x20;

Data Type: String&#x20;

#### Field ID: deviceName&#x20;

Field Display: Name&#x20;

Data Type: String&#x20;

#### Field ID: azureADDeviceID

Field Display: azureADDeviceID&#x20;

Data Type: String&#x20;

#### Field ID: SerialNumber&#x20;

Field Display: Sertial No

Data Type: String&#x20;

#### Field ID: PhoneNumber&#x20;

Field Display: Phone Number&#x20;

Data Type: String&#x20;

#### Field ID: complianceState

Field Display: Compliance State&#x20;

Data Type: String&#x20;

#### Field ID: OperatingSystem

Field Display: OS

Data Type: String&#x20;

#### Field ID: osVersion

Field Display: OS Version

Data Type: String

#### Field ID: model&#x20;

Field Display: Model&#x20;

Data Type: String&#x20;

#### Field ID: manufacturer&#x20;

Field Display: Manufacturer&#x20;

Data Type: String&#x20;

#### Field ID: lastSyncDateTime&#x20;

Field Display: last Sync Date Time&#x20;

Data Type: String&#x20;

#### Field ID: totalstorageSpaceInBytes&#x20;

Field Display: Total Storage in Bytes&#x20;

Data Type: String&#x20;

#### Field ID: freestorageSpaceInBytes&#x20;

Field Display: Free Storage SpaceInBytes&#x20;

Data Type: String&#x20;

#### Field ID: imei&#x20;

Field Display: IMEI&#x20;

Data Type: Boolean&#x20;

#### Field ID: iccid&#x20;

Field Display: ICCID&#x20;

Data Type: String&#x20;

#### Field ID: wiFiMacAddress&#x20;

Field Display: Wi-FI MAC&#x20;

Data Type: String&#x20;

#### Field ID: ethernetMacAddress&#x20;

Field Display: Ethernet Mac Address&#x20;

Data Type: String&#x20;

#### Field ID: enrolledDateTime&#x20;

Field Display: Enrolled Date Time&#x20;

Data Type: String&#x20;

#### Field ID: isEncrypted&#x20;

Field Display: Encrypted&#x20;

Data Type: String&#x20;

#### Field ID: isSupervised&#x20;

Field Display: Supervised&#x20;

Data Type: String&#x20;

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

Field Display: CompanyName&#x20;

Data Type: String&#x20;

#### Field ID: SubscriberCarrier&#x20;

Field Display: Subscriber Carrier&#x20;

Data Type: String&#x20;

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

Field Display: Primary User&#x20;

Data Type: String&#x20;

#### Field ID: managedDeviceOwnerType&#x20;

Field Display: Ownership&#x20;

Data Type: String&#x20;

#### Field ID: physicalMemoryBytes&#x20;

Field Display: Physical Memory Bytes&#x20;

Data Type: String&#x20;

</details>

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

This section is not applicable to the 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 *Microsoft\_InTune*, 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/deviceManagement/managedDevices&#x20;

**Manage Token**: &#x20;

* Tokenname: Your Client Intune Token
* 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;

{% hint style="info" %}
Please note that there are several fields that bring back data as bytes including Total and Free Storage space in Microsoft Intune. If you wish to convert these to GB then you would need to use the transform function in ASM, for example: Math.Round(Convert.toDecimal(PhysicalMemoryinBytes)/1073741824,2)
{% endhint %}

15. [Set up the integration's **scheduled scan**](https://docs.alemba.com/asm/integrate/managing-integration/managing-the-federated-cmdb/managing-scheduled-integration-scans)
