Home

Possible values for assignedPlan.service for A dynamic Azure AD Group creation

%3CLINGO-SUB%20id%3D%22lingo-sub-76712%22%20slang%3D%22en-US%22%3EPossible%20values%20for%20assignedPlan.service%20for%20A%20dynamic%20Azure%20AD%20Group%20creation%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-76712%22%20slang%3D%22en-US%22%3E%3CP%3EAm%20looking%20to%20create%20an%20Azure%20AD%20Dynamic%20Distribution%20group%20and%20was%20looking%20to%20only%20poputate%20users%20in%20the%20group%26nbsp%3Bbased%26nbsp%3Bon%20a%20specific%20licence%20SKU%26nbsp%3B%3C%2FP%3E%3CP%3EAm%20using%20a%20query%20%3A%3C%2FP%3E%3CP%3E(user.assignedPlans%20-any%20((assignedPlan.service%20-match%20%22exchange%22)%20-and%20(assignedPlan.capabilityStatus%20-eq%20%22Enabled%22)))%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Ehowever%20this%20query%20returns%20all%26nbsp%3Busers%20with%20Exchange%20enabled%2C%20but%20was%20looking%20for%20a%20value%20that%20i%20could%20use%20in%20the%20query%20for%20users%20with%20a%20specific%20licence%20sku%20e.g%20%22tenantname%3AENTERPRISEPACK%22%20or%20just%20for%20users%20assigned%20an%20%3CSPAN%20class%3D%22gridViewContainerControl%22%3E%3CSPAN%3EOffice%20365%20Enterprise%20E3%20licence.%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22gridViewContainerControl%22%3E%3CSPAN%3EIs%20this%20possible%20%3F%3F%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22gridViewContainerControl%22%3E%3CSPAN%3EAs%20always%20appreciate%20your%20inputs.%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-76712%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EAzure%20AD%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EEMS%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EOffice%20365%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-227904%22%20slang%3D%22en-US%22%3ERe%3A%20Possible%20values%20for%20assignedPlan.service%20for%20A%20dynamic%20Azure%20AD%20Group%20creation%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-227904%22%20slang%3D%22en-US%22%3E%3CP%3EExchange%20Online%20Plan%201%20has%20a%20different%20GUID%20than%20Plan%202.%20You%20could%20so%20something%20like%20this%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CTABLE%20width%3D%221133%22%3E%0A%3CTBODY%3E%0A%3CTR%3E%0A%3CTD%20width%3D%221133%22%3E%3CP%3Euser.assignedPlans%20-any%20(assignedPlan.servicePlanId%20-eq%20%22efb87545-963c-4e0d-99df-69c6916d9eb0%22%20-and%20assignedPlan.capabilityStatus%20-eq%20%22Enabled%22)%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3C%2FTBODY%3E%0A%3C%2FTABLE%3E%0A%3CP%3Eone%20way%20to%20discover%20what%20GUIDs%20you%20have%20available%20is%20by%20looking%20at%20a%20sample%20user%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-76894%22%20slang%3D%22en-US%22%3ERe%3A%20Possible%20values%20for%20assignedPlan.service%20for%20A%20dynamic%20Azure%20AD%20Group%20creation%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-76894%22%20slang%3D%22en-US%22%3E%3CP%3EI%20cannot%20think%20of%20any%20query%20that%20will%20work%20in%20general%2C%20but%20for%20example%20if%20you%20have%20a%20mix%20of%20E1%20and%20E3%20license%2C%20you%20can%20simply%20check%20for%20the%20presence%20of%20the%20%22Office%20subscription%22%20plan%2C%20or%20any%20other%20plan%20that's%20only%20available%20as%20part%20of%20E3.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-76786%22%20slang%3D%22en-US%22%3ERe%3A%20Possible%20values%20for%20assignedPlan.service%20for%20A%20dynamic%20Azure%20AD%20Group%20creation%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-76786%22%20slang%3D%22en-US%22%3E%3CP%3EThx%20Vasil.%20Could%20u%20share%20a%20query%20for%20this%20recomendation%20for%20making%20it%20work%20for%20a%20Dymanic%20DL%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-76780%22%20slang%3D%22en-US%22%3ERe%3A%20Possible%20values%20for%20assignedPlan.service%20for%20A%20dynamic%20Azure%20AD%20Group%20creation%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-76780%22%20slang%3D%22en-US%22%3E%3CP%3EAfaik%20Licenses%20is%20not%20a%20supported%20proprety%20for%20membership%20rules.%20Then%20again%2C%20AssignedPlans%20isnt%20listed%20as%20supported%20either%20but%20it%20does%20seem%20to%20work.%20So%20thanks%20for%20sharing%20that%20%3A)%3C%2Fimg%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIf%20you%20are%20just%20interested%20in%20E3%2C%20maybe%20simply%20use%20a%20filter%20against%20specific%20service%20included%20in%20E3%2C%20and%20not%20in%20other%20SKUs%20you%20might%20have%20in%20your%20tenant%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E
Bosco Joseph
Occasional Contributor

Am looking to create an Azure AD Dynamic Distribution group and was looking to only poputate users in the group based on a specific licence SKU 

Am using a query :

(user.assignedPlans -any ((assignedPlan.service -match "exchange") -and (assignedPlan.capabilityStatus -eq "Enabled")))

 

however this query returns all users with Exchange enabled, but was looking for a value that i could use in the query for users with a specific licence sku e.g "tenantname:ENTERPRISEPACK" or just for users assigned an Office 365 Enterprise E3 licence.

 

Is this possible ??

As always appreciate your inputs.

4 Replies

Afaik Licenses is not a supported proprety for membership rules. Then again, AssignedPlans isnt listed as supported either but it does seem to work. So thanks for sharing that :)

 

If you are just interested in E3, maybe simply use a filter against specific service included in E3, and not in other SKUs you might have in your tenant?

Thx Vasil. Could u share a query for this recomendation for making it work for a Dymanic DL

I cannot think of any query that will work in general, but for example if you have a mix of E1 and E3 license, you can simply check for the presence of the "Office subscription" plan, or any other plan that's only available as part of E3.

Exchange Online Plan 1 has a different GUID than Plan 2. You could so something like this

 

user.assignedPlans -any (assignedPlan.servicePlanId -eq "efb87545-963c-4e0d-99df-69c6916d9eb0" -and assignedPlan.capabilityStatus -eq "Enabled")

one way to discover what GUIDs you have available is by looking at a sample user

Related Conversations
Tabs and Dark Mode
cjc2112 in Discussions on
35 Replies
Extentions Synchronization
Deleted in Discussions on
3 Replies
flashing a white screen while open new tab
Deleted in Discussions on
14 Replies
Security Community Webinars
Valon_Kolica in Security, Privacy & Compliance on
9 Replies