Finds all Intune policies where a specific group is assigned - a reverse lookup across all policy types.
Syntax
# By name
Get-LKGroupAssignment
-Name <String[]>
[-NameMatch <String>]
[-PolicyType <String[]>]
[-SkipScopeResolution]
[-AssignmentType <String>]
[-DisplayAs <String>]
[<CommonParameters>]
# By ID
Get-LKGroupAssignment
-GroupId <String>
[-PolicyType <String[]>]
[-SkipScopeResolution]
[-AssignmentType <String>]
[-DisplayAs <String>]
[<CommonParameters>]
Description
Iterates across all policy types and checks each policy’s assignments for the specified group(s). Also includes broad targets (“All Devices”, “All Users”, “All Licensed Users”) when they would effectively target the group based on its member scope. A device group will see “All Devices” policies, a user group will see “All Users” policies, and mixed groups see both. Groups that are explicitly excluded from a policy are filtered out.
Policy scope is automatically resolved via Graph metadata so that ScopeMismatch is accurate. Use -SkipScopeResolution for faster results.