I created the following dynamic group that includes all my M365 licensed users using the following query:
user.assignedPlans -any (assignedPlan.servicePlanId -eq "094e7854-93fc-4d55-b2c0-3ab536xxxxx" -and assignedPlan.capabilityStatus -eq "Enabled")
I'd like to exclude some admin and resource accounts from the group. I tried the following, but it fails saving saying "Dynamic membership rule validation error: mixed use of properties from different types of objects"
user.assignedPlans -any (assignedPlan.servicePlanId -eq "094e7854-93fc-4d55-b2c0-3ab536xxxxx" -and assignedPlan.capabilityStatus -eq "Enabled") -and (user.userPrincipalName -notin ["user1@contoso.com","user2@contoso.com"])