How to Set Up an Integration with Azure/Intune
This page explains how to set up the built-in integration between xAssets and Microsoft Intune to import managed device inventory. The integration pulls enrolled devices from your Intune environment into xAssets as asset records.
Prerequisites
- An Azure tenant with Microsoft Intune enabled.
- Azure Portal administrator access to create application registrations.
- Access to xAssets with permission to create credential packs.
- The xAssets Batch Service must be running on the server (the integration runs as a batch job).
What the Integration Provides
The Intune integration imports the list of devices enrolled in your Intune environment into xAssets. This gives you visibility of Intune-managed devices alongside your other IT assets.
Note that hardware details from Intune are limited, and Intune only reports software from Intune-managed applications. To get full hardware specifications and a complete software inventory, combine the Intune integration with xAssets Network Discovery.
Step 1: Create an Enterprise Application in Azure
- Sign in to the Azure Portal.
- Navigate to Azure Active Directory > App Registrations > New Registration.
- Name the application (e.g., "xAssets Intune") and click Register.
- Navigate to Certificates & Secrets and generate a new client secret.
- Copy the secret Value immediately -- it is only shown once.
- Navigate to the API Permissions tab and grant the following Microsoft Graph permissions:
DeviceManagementManagedDevices.Read.All-- to read managed device data.- Any additional permissions required for your environment.
- Click Grant admin consent to activate the permissions.
- Copy the Application (Client) ID and Directory (Tenant) ID from the application overview page.
Step 2: Create a Credential Pack in xAssets
- In xAssets, navigate to Discover > Prepare > Credentials.
- Click Create Credentials.
- Configure the credential pack:
| Field | Value |
|---|---|
| Credential Type | Named Credentials |
| Collection Server | Application Server (not on a collection server) |
| Pack Name | Intune |
| Domain Name | Your Azure Tenant ID |
| Username | The Application (Client) ID from Step 1 |
| Password | The client secret Value from Step 1 |
- Save the credential pack.
Step 3: Run the Integration
- Navigate to Discover > Integrations > Get data from Microsoft Intune.
- Select the Intune credential pack.
- The integration runs as a batch job. Monitor progress at Admin > Batch > Batch Jobs.
- Once complete, verify the imported devices appear in your asset queries.
Step 4: Schedule the Integration (Recommended)
To keep your Intune device inventory current, schedule the integration to run daily:
- Navigate to the transformation that runs the Intune integration (found at Admin > Transformations).
- Open the Schedule tab.
- Enable the schedule and set it to run Daily at a quiet time (e.g., 2:00 AM).
- Save. See How to Set Up a Scheduled Batch Job for details.
Troubleshooting
If the integration fails with a permissions error:
- Open Microsoft Graph Explorer.
- Paste the Intune API URL:
https://graph.microsoft.com/v1.0/deviceManagement/managedDevices - Run the query.
- If permissions fail, the Graph Explorer's "Modify permissions" section shows which permissions are missing.
- Grant the missing permissions in the Azure Portal, click "Grant admin consent", and try the integration again.
Other common issues:
- Invalid credentials -- verify the Tenant ID, Client ID, and client secret are correct in the credential pack.
- Batch service not running -- check the xAssets Batch Service status in Windows Services on the server.
- Client secret expired -- Azure client secrets have expiration dates. Create a new secret in Azure, update the credential pack password, then delete the old secret.
Related Articles
- Microsoft Intune Integration — full reference with screenshots
- Azure Direct Integration — importing Azure VMs and Azure AD users
- Batch Jobs Overview — monitoring batch job status
- Scheduled Transformations — scheduling recurring integrations