Forum Discussion
dynamic group based on assigned license
I was wondering if you have found a solution to creating a dynamic group based on license. I am looking to the do the same.
Thank you,
Steve
This expression appears to be working for me
(user.assignedPlans -all (assignedPlan.service -ne "Unassigned" -and assignedPlan.capabilityStatus -eq "Enabled"))
To use the expression builder :
Set the Property to: assignedPlans
Set the Operator to: all
Set the Value to: (assignedPlan.service -ne "Unassigned" -and assignedPlan.capabilityStatus -eq "Enabled")
- DegreeSixDec 03, 2021Copper Contributor
Scratch this - It looked like it worked to get my licensed users assigned to the group during testing.
In production, this failed horribly.
It turns out that groups, contact, and other items were added to the group because they too do not equal "Unlicensed".
So my dynamic group ended up with 168 members vs. the 35 I was expecting.
I'll post again if I figure this out.
- jbrahms-esJan 26, 2022Copper Contributor
DegreeSix please share if you figure it out.
Right now we're in Intune beta testing with both MS365 E3 and E5 licenses, and EMS E3 and E5s. I want to create a group (or a filter) that will pull users who have that license and change them up to Windows Enterprise.
- PatrickF11Dec 02, 2021MCT
Am i missing something? With this you're just querying users who are licensede in any way, isn't it?
The initial quesiton was: How to group EXACT license like "M365 E3", not querying on any SKU which could be part of some other license as well.
shathaway unfortunatelly not, but i (personally) don't need this anymore. 😄
(nevertheless the question is still open.)
- terockyFeb 08, 2022Copper Contributor
Hi PatrickF11, Did you find a solution yet? I am trying to do same as i have F3, E1 and E3 license users now.
- DomAnnicetteMar 08, 2022Brass ContributorI just found this (because I'm trying to achieve the same goal). It works fine.
https://365bythijs.be/2020/01/20/creating-a-dynamic-group-with-all-aad-premium-licensed-users/
You can use this as an example to retrieve your subscription ObjectID and then ServicePlanID.