Why are we using Autopilot group tags?
Why are we using Autopilot group tag? Do we need group tags?
Two valid questions which I will discuss in this blog post.
So, why do we use group tags?
The short answer, to add the device to the correct group!
The long answer
Next, we have different device types for different use cases, we call them worker types. We currently have the standard device, engineering device, shared device, virtual device and kiosk device. User can have multiple devices which have different worker types. So, that is the second requirement.
Other requirements are to separate laptops, desktops and virtual devices. And yes, we could use filters instead, but they were not available 4 years ago. And finally, the need to mark devices as pre-production and to be able to see which global service the device is part of.
How do we use the group tags?
Based on the group tag, the device will be a member of a group. The group is used to add the scope tag to the device and to assign configurations and applications.
We also export the Autopilot data to Log Analytics, so we can leverage the group tag in our reporting.
Another cool thing we have build based on the group tags is an interface around Autopilot. In this way, we can add additional checks when importing device hashes, like only allowing specific hardware models and checking if the group tag is correct. It also provides a RBAC over the devices in Autopilot, once the initial import is done only admins for that entity change the device.
See the blog of Ivo Uenk on this topic: Import or remove Windows Autopilot devices based on specific criteria - Modern Workplace, Consultancy and Education | Udirection.
Can we do without group tags?
Yes, we can! We could also directly add the device to the correct group, which will have the same effect.
Looking at the new Autopilot version, Device Preparation, for use it would be mandatory that the device is added to the correct group, based on a identifier, in time to get the correct configuration.
And instead of group tag, we could use scope tags in the reporting or build some automation to get the information in Log Analytics. With scope tags only, we lose the ability to distinguish between environment and worker type.
How is the tag built up?
We have structured the group tag as follows:
How is dynamic query build?
The group tag value is stored in a multivalued string property of the device object in EntraID called physicalIds. The group tag string in this property has the prefix [OrderId], which can be used in a dynamic group query to add the device as a member to the group.
Some example queries:
• Add all Azure joined laptops to a group:
(device.devicePhysicalIds -any (_ -match ".OrderId.:(STOLEN_|)A-…-.-.-L"))
• Add all Azure and Hybrid joined Software Engineering Production Desktops of country XX/Entity YY to a group:
(device.devicePhysicalIds -any (_ -match ".OrderId.:(A|H)-CDS-S-P-D-XX-YY"))
Device filtering in Conditional Access?
You can use the group tag ([OrderId]) also as part of a device filter in a conditional access policy. But in this query, you need to specify the complete group tag value. You cannot use wildcards.
The query would be:
(device.physicalIds -contains "[OrderId]:A-CDS-O-P-L-FR-00")
Comments
Post a Comment