Forum Discussion
Trying to create a dynamic group of users
Good afternoon.
I am trying to create a dynamic group in Entra ID of users who have the Microsoft Office Business Premium license. I have tried in the Groups area of Entra ID using the rule creation interface (assignedPlans.serviceID) and in Powershell using commands in the Microsoft Graph library. Nothing works, I get errors saying properties aren't supported or I get way too many results for a single user and single sku.
Has anyone successfully done this? I have the SKU and the SKU ID.
Thanks
3 Replies
- DavidEIICopper Contributor
So I figured out that the serviceplanID for Business Premium is essentially a container that has many sub-serviceplanIDs. I found one of the sub-serviceplanIDs that is in BP only and not in the other other plans I had. That essentially solved my issue. The syntax was correct.
Thanks everyone.
- AlinaMiroshnykCopper Contributor
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.
- lucheteIron Contributor
Good morning DavidEII,
When creating a dynamic group based on the Microsoft Office Business Premium license in Entra ID, you need to make sure that the correct service plan ID and filter are used. Sometimes errors happen if the query isn't targeting the right attributes or if there are mismatched properties. I recommend double-checking the syntax and making sure the service plan ID is correctly applied. You might also want to try simplifying the filter to avoid pulling unnecessary results.
If you’re still stuck, in my experience, verifying the exact SKU ID and testing with smaller filters can help narrow things down.
Hope it helps!