From 0d0bc7735ed062501fd715d0bedb3e9c0f28ba25 Mon Sep 17 00:00:00 2001 From: Ben Jenkins <140325164+Yebbenbe@users.noreply.github.com> Date: Thu, 5 Mar 2026 15:37:40 -0400 Subject: [PATCH] Enhance dynamic membership examples for users added the simplest form of this query after testing --- docs/identity/users/groups-dynamic-membership.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/docs/identity/users/groups-dynamic-membership.md b/docs/identity/users/groups-dynamic-membership.md index ebec2e09521..f81361a2f7a 100644 --- a/docs/identity/users/groups-dynamic-membership.md +++ b/docs/identity/users/groups-dynamic-membership.md @@ -311,9 +311,17 @@ The following expression selects all users who have any service plan that's asso ``` user.assignedPlans -any (assignedPlan.service -eq "SCO" -and assignedPlan.capabilityStatus -eq "Enabled") ``` - ##### Example 3 +The following expression selects all users who do not a service plan associated with Intune, or have that service plan disabled. This covers both situations where no SCO plan is assigned, or the SCO plan is disabled. + +``` +-not ( + user.assignedPlans -any (assignedPlan.service -eq "SCO" -and assignedPlan.capabilityStatus -eq "Enabled") +) +``` +##### Example 4 + The following expression selects all users who have no assigned service plan: ```