Forum Discussion
Trying to create a dynamic group of users
Hi DavidEII
To create a dynamic group and add users who have a specific license to it, you can use the following rule:
user.assignedPlans -any (assignedPlan.servicePlanId -eq "eec0eb4f-6444-4f95-aba0-50c24d67f998" -and assignedPlan.capabilityStatus -eq "Enabled").
It's crucial to specify the correct service plan ID. To find the correct service plan ID, please refer to the documentation https://learn.microsoft.com/en-us/entra/identity/users/licensing-service-plan-reference. The documentation indicates that Microsoft 365 Business Premium is a product name with its unique GUID. Microsoft 365 Business Premium includes several service plans; therefore, Microsoft 365 Business Premium itself is not a service plan but a product that includes service plans.
Thus, the dynamic membership rule should query for something unique to the Microsoft 365 Business Premium license plan. If your tenant only includes business licenses, it will be straightforward to select Microsoft Business Premium. For instance, Business Premium includes service plans such as Entra ID Premium or Intune, which Business Basic and Standard do not include.
For example, the user has M365 E5 license
Microsoft Entra ID P2 (eec0eb4f-6444-4f95-aba0-50c24d67f998)
I hope you find this helpful.