azureazure-active-directoryintuneautopilot

Azure AD dynamic group query error when using "and" to combine two working queries


Does anyone know how I can get this dynamic query working?

(device.deviceTrustType -ne "ServerAD") and (device.devicePhysicalIds -any "(_ -match "^[OrderID]:.*_AzureAD_UserDriven$")

***This works: (device.deviceTrustType -ne "ServerAD")

**This works: device.devicePhysicalIds -any "(_ -match "^[OrderID]:._AzureAD_UserDriven$")

But I can not bind them together


Solution

  • Could you please try the below

    (device.devicePhysicalIds -any (_ -match "^[OrderID]:._AzureAD_UserDriven$")) and (device.deviceTrustType -ne "ServerAD")

    I hope this version works for you. Let me know if you have any other concerns.