Forum Discussion
Create dynamic device group based off of which user enrolled the device
- Aug 20, 2022
Hi skythrock,
From my understanding, it wasn't possible to create a dynamic group based on which users enrolled the device into Azure AD. But I did some research via the Graph API and I have found a solution. And that the physicalIds field in Azure AD contains USER-GID information. So this means that you can build a dynamic query on that.
The only thing you need is the ID of your admin account. So go to Azure AD -> Users -> Admin account-> Copy userid from address barSo, you have all the needed information and you use create a dynamic group with the following Dynamic query and you will get all Azure AD devices that have been enrolled with your admin account.
device.devicePhysicalIDs -any _ -contains "[USER-HWID]: <ID of your Admin account> "
OR
device.devicePhysicalIDs -any _ -contains "[USER-GID]:<ID of your Admin account>"
Hopefully, this will help you.
Kind regards,
Rene
Hi skythrock,
From my understanding, it wasn't possible to create a dynamic group based on which users enrolled the device into Azure AD. But I did some research via the Graph API and I have found a solution. And that the physicalIds field in Azure AD contains USER-GID information. So this means that you can build a dynamic query on that.
So, you have all the needed information and you use create a dynamic group with the following Dynamic query and you will get all Azure AD devices that have been enrolled with your admin account.
device.devicePhysicalIDs -any _ -contains "[USER-HWID]: <ID of your Admin account> "
OR
device.devicePhysicalIDs -any _ -contains "[USER-GID]:<ID of your Admin account>"
Hopefully, this will help you.
Kind regards,
Rene