Since the changes to Microsoft's requirements for AD authentication with certificates, I have an issue which has gone from annoying to problematic.
Essentially, for many customers and what I want to do, I need to be able to access the "Intune Device ID" and the "AAD Device ID". The first is used in requests to the ClearPass extension, while the second is used to interrogate Entra ID to get various pieces of information, including group membership, user risk, "enabled" status, etc.
Currently, we can access the Intune ID in two ways:
- Put it in the certificate subject's CN field
- Retrieve it from the Endpoint Repository's "Intune Device ID" Attribute
We can access the AAD Device ID in two ways:
- Put it in the certificate subject's CN field
- Retrieve it from the Endpoint Repository's "Intune Azure AD Device Id" Attribute
The first can be problematic. For example, if your user certificate is also a WHfB certificate, and you want to do SSO to local AD, you need to put the user DN in there. There's also the problem that it doesn't fix the issue of getting both IDs.
The Endpoints Repository also requires that the MAC address gets correlated between your device and the Endpoints Repository. And this is becoming an issue with MAC address randomization becoming more prevalent. Mobile OS have been doing this for a long time, and MacOS 15 now does this also. Disabling it has security and privacy implications, not even taking into account the fact that Intune doesn't even support doing so easily for MacOS 15. There's also the issue that relying on a MAC address for anything at all in 2025 is problematic. I would prefer using the client certificate's properties to get the Intune Device Id and AAD Device Id.
As I mentioned, this came in part following Microsoft's changes to the AD certificate authentication requirements. We now need to put a tag:microsoft.com entry into the SAN certificates, as an URI field. We previously were putting the Intune Device Id in there. ClearPass now recommends putting in the Intune Device Id and Azure AD Device Id in that field as well.
Well, that's great! I can access both field in the certificate.
Except that I cannot. I have found no documentation or method to access these fields and use them in an authorization method.
I have managed to get them from the "Endpoints Repository" authorization method instead, but I cannot use those fields in a different authorization method.
If I modify the "Endpoints Repository" source like this:
Authentication Filter Query: SELECT mac_address AS User_Password FROM tips_endpoints WHERE (mac_address = LOWER('%{Connection:Client-Mac-Address-NoDelim}') AND status = 'Known') OR (attributes->>'Intune ID' = '%{Authentication:Username}' AND attributes->>'Intune System Found' = 'true')
Intune Filter Query: select attributes->>'Intune Azure AD Device Id' as "IntuneAzureADDeviceId", attributes->>'Intune Device Name' as "IntuneDeviceName", attributes->>'Intune System Found' as "IntuneSystemFound", attributes->>'Intune ID' as "IntuneID" FROM tips_endpoints WHERE attributes->>'Intune ID' = '%{Authentication:Username}' AND attributes->>'Intune System Found' = 'true'
I can use the properties synced from Intune in my Role Mapping. But I cannot use them in my Intune or Entra ID authorization sources. If I try to add "%{Authorization:[Endpoints Repository]:IntuneAzureADDeviceId}" in a query, it appears to strip the first "[" and obviously does not succeed in querying the source.
So I have two questions:
Is there a way to access the "Intune Device Id" and the "AAD_Device_Id" fields in a certificate's SAN?
Is there a way to use attributes gleaned from one authorization method into a different authorization method?
The second method would be more convoluted, but I think I can work with that. The first would be ideal.