Intune Integration  

Intune integration imports device inventory data from Microsoft Intune into Nilex Service Platform (NSP). It connects to Microsoft Graph API using Azure AD authentication, retrieves managed device reports, and creates or updates Computer CI (Configuration Item) records in NSP. 

You configure column mappings between Intune device attributes and NSP CI fields. NSP enriches each device record with Azure AD user profile data (department, job title, phone, manager). Import supports automatic mapping suggestions, custom field matching, and scheduled recurring imports. 

Prerequisites 

   Admin access to NSP Admin Portal. 

   An Azure AD tenant with Microsoft Intune license. 

   Managed devices enrolled in Intune. 

   An Azure AD App Registration with required permissions (see Section 3). 

   Tenant ID, Application (Client) ID, and Client Secret from App Registration. 

 

Azure AD App Registration  

Intune integration authenticates via OAuth2 client credentials. You need an App Registration in Azure AD with specific API permissions.  

Creating an App Registration 

1.  Open Azure Portal (https://portal.azure.com). 

2.  Navigate to Azure Active Directory > App registrations. 

3.  Click New registration. 

4.  Enter a name (e.g., NSP Intune Integration). 

5.  Select Accounts in this organizational directory only as supported account type. 

6.  Leave Redirect URI empty. Click Register. 

7.  After registration, note these two values from Overview page: 

 

Value 

Where to Find 

Application (Client) ID 

App Registration > Overview page. A GUID value. 

Directory (Tenant) ID 

App Registration > Overview page. A GUID value. 

 

 

Azure Portal: App registrations  

 

 

Azure App Registration Overview page  

Creating a Client Secret 

1.  In your App Registration, go to Certificates & Secrets. 

2.  Click New client secret. 

3.  Enter a description (e.g., NSP Integration). 

4.  Select an expiry period (e.g., 12 months, 24 months). 

5.  Click Add. 

6.  Copy secret Value immediately. This value is shown only once. You enter this in NSP as an Application Secret. 

7. Note the expiry date. You need to renew it before it expires. 

 

 

Certificates & secrets page  

Adding API Permissions 

1.  In your App Registration, go to API permissions. 

2.  Click Add a permission. 

3.  Select Microsoft Graph. 

4.  Select Application permissions (not Delegated). 

5.  Search and add each permission listed below. 

 

Permission 

Purpose 

DeviceManagementManagedDevices.Read.All 

Read Intune managed device data. Required for export reports. 

User.Read.All 

Read Azure AD user profiles. Required for device user enrichment. 

Application.Read.All 

Read app registration details. Used for secret expiry check. 

Directory.Read.All 

Read directory data. Required for user manager information. 

 

 

API permissions page  

 

API permissions list  

Granting Admin Consent 

1.  On API permissions page, click Grant admin consent for [Your Tenant]. 

2.  Confirm by clicking Yes. 

3.  Verify all permissions show a green checkmark under Status column. 

 

API permissions page with Grant admin consent  

All permissions must have admin consent. Without consent, connection test in NSP will fail. 

Configuring Intune Integration 

Configuration > Channels > Integration Settings > Intune Register 

Open NSP Admin Portal. Navigate to Integration settings. Find Intune Register in your integration list. Then, client to Active. 

 

Integration Settings: Intune Register  

Click Intune Register to open configuration wizard. Import Now button appears when integration is enabled. Click it to trigger an immediate import. 

 

Intune Register: Import Now  

Intune configuration wizard has 3 steps: Connection, Mapping, and Settings. 

1: Connection 

Configure connection to your Azure AD / Microsoft Intune environment. 

Field 

Required 

Description 

Tenant ID 

Yes 

Directory (Tenant) ID from Azure AD. A GUID value from App Registration Overview page. 

Application ID 

Yes 

Application (Client) ID from Azure AD App Registration Overview page. 

Application Secret 

Yes 

Client Secret value from Certificates & secrets page (see Section 3.2). 

 

Enter your Tenant ID, Application ID, and Application Secret, then click Connect. NSP authenticates using OAuth2 client credentials flow against Microsoft Graph API. A success message confirms your connection works. 

After a successful connection, NSP loads available device report columns from Intune. Available columns are displayed in a scrollable list below connection fields. These columns represent device attributes you map in next step. 

 

Step 1: Connection form  

 

If you change any connection field after connecting, click Connect again to re-validate. 

Click Next to proceed to Mapping step. 

2. Mapping 

Configure how Intune device columns map to NSP CI fields. Each mapping row defines which Intune attribute populates which NSP property during import. 

Add Field Mapping (Optional) 

By default, import matches devices using Device ID. When a device record arrives from Intune, NSP looks for an existing CI with a matching Device ID. If found, NSP updates that CI. If not found, NSP creates a new CI. 

Enable Add field mapping checkbox to add a second matching layer. When enabled, import follows this order: 

1.  Look for an existing CI by Device ID. 

2.  If no match by Device ID, look for an existing CI using your selected field pair (e.g., Serial Number). 

3.  If no match by either method, create  

When to use this feature 

This feature is useful when your NSP already contains Computer CIs that were created manually or imported from another source. These existing CIs do not have a Device ID because they did not come from Intune. 

Without Add field mapping: Import creates duplicate CIs for every device, because Device ID matching finds nothing. 

With Add field mapping (e.g., Serial Number): Import matches existing CIs by serial number, updates them with Intune data, and assigns a Device ID. No duplicates are created. 

After first successful import, all matched CIs have Device ID. Subsequent imports find devices by Device ID directly. Add field mapping is only needed for initial matching of pre-existing CIs. 

Field 

Description 

Staging field 

Select an Intune column as matching key (source side). Example: DeviceName, SerialNumber. 

CI Property 

Select an NSP CI field or property to match against (target side). Example: ci:name, ciprop:SerialNumber. 

 

 

Add field mapping  

Column Mapping Table 

Mapping table has two columns: Intune attribute (source) and NSP attribute (target). Each row maps one Intune column to one NSP CI field or CI property. Remove a row by clicking X button on its right side. 

Actions: 

   Add mapping: Adds a new empty row. 

   Clear: Removes all mappings and resets to a single empty row. 

   Choose Automatically: NSP analyzes Intune column names and suggests mappings based on name matching and alias lookup. 

NSP attributes in dropdown are grouped into two categories: 

   CI Fields: Core Computer CI fields (Name, IP Address, MAC Address, Domain, UUID). 

   CI Properties: Custom properties on Computer CI type (Serial Number, Vendor, Model, OS). 

 

Step 2: Mapping  

At least one valid mapping is required. Duplicate Intune column mappings are not allowed. Both Intune column and NSP attribute must be selected for a row to count as valid. 

Click Next to proceed to Settings step. 

3. Settings (Scheduler) 

Configure automatic recurring imports. 

Scheduler 

Use Enable Scheduler checkbox to set up automatic recurring imports. When enabled, schedule editor appears with these options: 

Schedule Type 

Description 

Generate Once 

Runs import one time at a specified date and time. 

Daily 

Runs every N days at a specified time. 

Weekly 

Runs on selected days of a given week, every N weeks. 

Monthly 

Runs on a specific day of selected months, every N months. 

 

For Daily, Weekly, and Monthly schedules, you configure an end condition: no end date, end after N occurrences, or end by a specific date. 

 

Step 3: Settings  

Click Finish to validate settings, save all configuration, and close wizard. NSP validates Intune connection one final time before saving. 

Running an Import 

Manual Import 

Click Import Now button next to Intune Register in your integration list. NSP creates an import job that runs immediately. Monitor progress in Status View. 

 

Integration list with Import Now button  

Scheduled Import 

If you have configured a schedule in Step 3, imports run automatically at defined times. Each scheduled run creates a status entry visible in Status grid. 

Import Status and Logs 

Status Grid 

Status grid shows all import jobs (manual and scheduled). Each row represents one import run. 

Grid columns: 

   ID: Unique job identifier. 

   Request Time: When import was requested. 

   Status: Current state (Running, Completed, Cancelled, Failed, Skipped). 

   Progress: Percentage of records processed. Running jobs show a real-time progress bar. 

   Integration Type: Shows Intune. 

   Last Run: Timestamp of most recent completed run. 

   Next Run: Timestamp of next scheduled run. 

   Run Count: Number of completed runs for this job. 

 

Status grid showing multiple import jobs  

You cancel a running job using Cancel button. Grid auto-refreshes while jobs are running. Use toolbar Refresh button to manually refresh. Use search bar to filter jobs. 

Run Log Details 

Click View Log on any status row to see detailed statistics for that import run. 

Run log shows two rows of information: 

Summary Row 

   Status: Final status (Completed, Failed, Cancelled). 

   Request Time: When import was triggered. 

   Processed: Records processed out of total (e.g., 250/250). 

   Errors: Records that failed to import. 

Statistics Row 

   Inserted: New Computer CIs created. 

   Updated: Existing Computer CIs updated with new data. 

   Deleted: CIs marked as disposed (devices no longer managed in Intune). 

   Skipped: Records skipped (e.g., missing identity value). 

 

Run log detail view  

Click Refresh to update log data. Click Close to return to status grid. 

How Import Works 

When you run an import (manually or scheduled), NSP connects to Microsoft Intune and pulls device data into your system. Here is what happens step by step: 

1.  NSP logs in to your Azure AD tenant using your Tenant ID, Application ID, and Secret. 

2.  NSP requests a device report from Intune. Intune prepares this report as a downloadable file. 

3.  NSP waits for Intune to finish preparing. This takes a few seconds to a few minutes depending on how many devices you have. 

4.  NSP downloads and reads device data from this file. 

5.  For each device, NSP checks if it already exists in your system (by Device ID or your custom field mapping). 

6.  If a device exists, NSP updates it with latest data. If not, NSP creates a new Computer CI. 

7.  For each device that has a user assigned, NSP pulls user details from Azure AD (name, department, job title, manager, contact info) and attaches them to that CI. 

8.  NSP marks all imported devices as In Use. 

9.  When finished, NSP saves a log with totals: how many devices were added, updated, skipped, or had errors. 

You track progress and results in Status grid and Run Log. 

Azure AD User Enrichment 

When a device has an associated user (Primary User UPN), NSP queries Microsoft Graph API to retrieve a full user profile. This enriches CI record with additional information: 

   Display name, given name, surname. 

   Email, user principal name. 

   Department, company name, job title. 

   Mobile phone, office location. 

   Manager information (name, email). 

   On-premises AD attributes (domain, SAM account name). 

   Location details (city, state, country, postal code). 

   Employee ID, employee type. 

   Account status (enabled/disabled). 

User profiles are cached during import batch to avoid redundant API calls for devices shared by same user. 

Import process supports cancellation. Cancelled imports log all records processed up to cancellation point. 

Automatic Device Disposal 

When a device is removed from Intune (via Delete or Retire), it no longer appears in the device report. On the next import, NSP detects this and automatically transitions the corresponding Computer CI to an inactive lifecycle state. No manual cleanup is required. 

This applies to both scenarios: 

   Delete: The device is permanently removed from Intune. 

   Retire: The device is retired (wiped and unenrolled) from Intune. 

In both cases, once the device disappears from the Intune report, NSP marks the CI with the configured dispose state. 

 

Email Notification 

When import completes, NSP can send an email notification with a summary report. To enable this, enter one or more email addresses in the Send Logs to Email field in the Settings step of the configuration wizard. 

The email includes: 

   Import status (Completed, Failed, or Cancelled). 

   Summary counts: total processed, inserted, updated, disposed, skipped, and errors. 

   A tab-separated report file attached with per-device details: device name, external ID, action taken (Inserted, Updated, Disposed, Skipped, Error), and any relevant messages. 

Multiple email addresses are supported. Enter each address and press Enter to add it. If the field is left empty, no email is sent. 

Troubleshooting 

 

Problem 

Cause 

Solution 

Connection fails when clicking Connect 

Wrong Tenant ID, Application ID, or Secret. Permissions not granted. 

Verify all three values match your Azure AD App Registration. Ensure admin consent is granted for required permissions. 

Connection succeeds but no columns appear 

App lacks DeviceManagementManagedDevices.Read.All permission. 

Add required permission in Azure AD and grant admin consent. See Section 3.3. 

No automatic mappings generated 

Intune column names do not match any known NSP CI field names. 

Add mappings manually. Check Intune column names match expected formats. 

Import runs but no CIs created 

Mappings are incorrect, or no devices are enrolled in Intune. 

Verify mappings. Check Intune portal for enrolled devices. Review run log for errors. 

Import takes a long time 

Export job creation on Microsoft side takes time with large tenants. 

This is expected. Export job polls for up to 3 minutes. Large tenants with thousands of devices take longer. 

User enrichment data missing 

User.Read.All permission not granted, or user has no profile data. 

Verify User.Read.All permission with admin consent. Check user profiles in Azure AD portal. 

Import Now button not visible 

Integration is not enabled. 

Open Intune Register wizard and complete all steps to enable integration. 

Application Secret expired 

Client Secret in Azure AD has expired. 

Create a new Client Secret in Azure AD App Registration (Section 3.2). Update secret value in NSP wizard.