Microsoft Intune device sync
Airgate reads the devices Intune manages from Microsoft Graph and writes their state (managed, compliance, OS, owner…) to the matching device records. Access policies can then say “allow only Intune-managed, compliant laptops”. This page sets up the Entra ID app registration, connects it in Airgate, and explains how devices are matched.
How it works
Section titled “How it works”- Airgate calls
GET https://graph.microsoft.com/v1.0/deviceManagement/managedDeviceswith an app-only token (client credentials) every sync interval, default every hour. - Matching by MAC. Each Intune device is written to the device records
of its Wi-Fi and Ethernet MAC addresses (
wiFiMacAddress,ethernetMacAddress). Only devices whose data changed since the last sync are written. When two Intune records report the same MAC, the one that checked in most recently wins. Intune does not report a MAC for every platform (for example Android work profiles); those devices are skipped. - Matching by Intune device ID. Phones and laptops often join Wi-Fi with
a private (random) MAC that matches nothing in Intune. If the Intune SCEP
certificate carries the device ID as a URI SAN
(
IntuneDeviceId://{{DeviceId}}), Airgate reads it during EAP-TLS (Certificate:Intune-Device-Id), finds the synced Intune record with that ID, and adds its facts to the sign-in, whatever MAC the device uses. The SentinelOne and CrowdStrike facts of the same device (found by its hardware MACs or serial number) are added too. - A device that leaves Intune gets
Intune Managed = false,MDM Enabled = falseandMDM Compliant = false. - Synced devices also fill the device’s host name, owner and device type when Airgate knows nothing better.
Before you begin
Section titled “Before you begin”- A Microsoft Entra role that can register applications and grant admin consent for application permissions (Application Administrator or Cloud Application Administrator, plus Privileged Role Administrator or Global Administrator for consent).
- An Airgate administrator with
admin:write(Tenant Administrator). - Airgate reaches
login.microsoftonline.comandgraph.microsoft.comover HTTPS. - For matching by device ID: Intune SCEP certificates for Wi-Fi, see Intune SCEP.
Step 1: Register an app in Microsoft Entra ID
Section titled “Step 1: Register an app in Microsoft Entra ID”- In the Microsoft Entra admin center, open Identity › Applications › App registrations › New registration.
- Name
Airgate Intune sync, Supported account types Accounts in this organizational directory only (single tenant), no redirect URI. Select Register. - On the app’s Overview, copy the Directory (tenant) ID and the Application (client) ID.
- Open API permissions › Add a permission › Microsoft Graph ›
Application permissions, search for and tick
DeviceManagementManagedDevices.Read.All, and select Add permissions. - Select Grant admin consent for
and confirm. The permission shows Granted. - Open Certificates & secrets › Client secrets › New client secret, choose an expiry, and copy the Value (it is shown once).
DeviceManagementManagedDevices.Read.All is the only permission Airgate
needs: it only reads the managed-device list.
Step 2: Connect Intune in Airgate
Section titled “Step 2: Connect Intune in Airgate”-
Open Integrations › Microsoft Intune.
-
In Connect Microsoft Intune, enter:
Field Value Directory (tenant) ID from Step 1 Application (client) ID from Step 1 Client secret the secret value (stored encrypted) Sync devices on, with the interval: Every 15 minutes, Every 30 minutes, Every hour, Every 4 hours or Once a day -
Select Connect. The first sync starts within a minute.
-
Select Test connection. A success shows “Microsoft Graph managedDevices reachable”.
To sync immediately (for example after fixing a device’s compliance in Intune), select Sync now; the sync starts within 30 seconds.
Step 3: Use Intune in access policies
Section titled “Step 3: Use Intune in access policies”In Access › Access policies, the rule conditions Intune managed (Yes (managed by Intune) / No) and Intune compliance (Compliant, Not compliant, In grace period) read the synced attributes. Example for an employee policy:
| Order | Rule | When | Then |
|---|---|---|---|
| 1 | Managed and compliant |
Intune managed Yes and Intune compliance Compliant | Allow, VLAN 20 |
| 2 | Managed, not compliant |
Intune managed Yes | Allow, remediation VLAN 90 |
| Default | Deny |
For other attributes, add a condition on Endpoint:<attribute> to a rule
through the API (/api/v1/t/{tenant}/enforcement-policies), for example
Endpoint:Intune Managed Device Owner Type EQUALS personal for a BYOD VLAN.
The Access policies page shows such conditions as they are and keeps them.
Attributes written
Section titled “Attributes written”| Attribute | Value |
|---|---|
Intune Managed |
true while Intune manages the device, false once it leaves |
Intune Compliance State |
compliant, noncompliant, inGracePeriod, conflict, error, unknown |
MDM Compliant |
true / false (compliance as yes or no) |
MDM Enabled |
true |
Compliance |
Intune complianceState |
Intune Managed Device Owner Type, Ownership |
company, personal |
Intune Operating System, Intune OS Version, OS, OS Version |
for example Windows, 10.0.26100.2314 |
Intune Is Encrypted, Encryption Enabled |
true / false |
Intune Jail Broken, Jailbroken |
True, False, Unknown |
Intune User Principal Name, Owner |
the enrolled user |
Intune Last Sync Date Time, Last Check In |
last Intune check-in |
Intune ID, MDM Identifier |
Intune device ID |
Intune Serial Number, Serial Number, Intune Model, Model, Intune Manufacturer, Manufacturer |
hardware |
MDM Source |
Intune: <connection name> |
Also: Intune User ID, Intune Device Name, Intune Managed Device Name,
Intune Enrolled Date Time, Intune Compliance Grace Period Expiration Date Time, Intune Management Agent, Intune Azure AD Registered, Intune Azure AD Device Id, Intune Device Enrollment Type, Intune Device Registration State, Intune Device Category Display Name, Intune Is Supervised, Intune IMEI, Intune MEID, Intune Wi Fi MAC Address,
Intune Ethernet MAC Address, Intune Partner Reported Threat State,
Intune Eas Activated, Intune Exchange Access State. The names match the
ClearPass Intune extension, so migrated policies keep working.
Turn the sync off or disconnect
Section titled “Turn the sync off or disconnect”- Sync devices off: Airgate removes the Intune attributes from every device.
- Connection enabled off: the sync pauses and the attributes stay.
- Disconnect: the sync stops and the attributes are removed, so rules that check them stop matching.
Verify
Section titled “Verify”- The status tiles show Devices synced, Last sync (with updated and removed counts), Next sync and Connection OK.
- Devices from Microsoft Intune lists the synced devices with compliance, OS, ownership and user. Select a MAC to open the device.
- Devices › Devices › a MAC › Attributes: the
Intune …attributes. - Monitor › Sign-in log › a record › Computed attributes:
Endpoint:Intune Managedand, with device-ID matching,Certificate:Intune-Device-Id.
Troubleshooting
Section titled “Troubleshooting”| Symptom | Cause | Fix |
|---|---|---|
The last sync failed: graph managedDevices HTTP 403: … |
The permission is missing or admin consent was not granted. | Add DeviceManagementManagedDevices.Read.All as an Application permission and grant admin consent. |
Connection failed with an AADSTS7000215 (invalid client secret) or AADSTS700016 (application not found) message |
Wrong secret value (the secret ID was pasted) or wrong client or tenant ID. | Paste the secret Value; check both IDs. |
The last sync failed: MDM returned no devices; keeping the N known devices … |
Graph returned an empty list although devices were synced before. Airgate keeps the old data to protect your policies. | Check the app’s permission and scope. If the inventory is really empty, accept it by setting allow_empty on the context server (Settings › Webhooks › Context servers, Accept an empty inventory). |
| Sign-in log: Denied: managed by Intune check failed, fact “not found in Intune (device MAC not in the Intune sync)” | The device’s MAC is not in Intune (Android work profile, or a docking-station NIC). | Use device-ID matching, or allow the device by another rule. |
| Sign-in log: fact “not found in Intune: the device uses a private Wi-Fi address and its certificate has no Intune device ID” | Private Wi-Fi address and no device ID in the certificate. | Add the URI IntuneDeviceId://{{DeviceId}} to the Subject alternative name of the Intune SCEP profile. Until the device has the new certificate, turning Private Wi-Fi address off for this network also works. |
| Sign-in log: Denied: intune compliance check failed | The device is not compliant in Intune. | Fix the device in Intune, then select Sync now. |