0

I want to creat a dynamic group that get all users that has MICROSOFT 365 BUSINESS PREMIUM

Syntax

(user.accountEnabled -eq true) and (user.assignedPlans -eq SPB)

The string is base on this link

MICROSOFT 365 BUSINESS PREMIUM = SPB

Above give me an error saying

Failed to create group
Failed to create group Business Premium Users. Dynamic membership rule validation error: Invalid value.

PS. I also tried the guId. gives the same error

Julius Limson
  • 526
  • 9
  • 29

1 Answers1

1

Firstly, SPB (MICROSOFT 365 BUSINESS PREMIUM) is license rather than plan. So you should look into user.assignedLicenses rather than user.assignedPlans.

Secondly, for Multi-value properties, we should use -any operator, for example:

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

So combining the above two points, it should be written like this (please note that cbdc14ab-d96c-4c30-b9f4-6ada7cdc1d46 is the GUID of MICROSOFT 365 BUSINESS PREMIUM):

user.assignedLicenses -any (assignedLicense.skuId -eq "cbdc14ab-d96c-4c30-b9f4-6ada7cdc1d46")

Unfortunately, assignedLicenses property is not listed in this article. And based on my test, it will show Dynamic membership rule validation error: Invalid object type.

I finally found a user voice post which mentions the same thing. You can vote it up if you need this feature.

Allen Wu
  • 15,529
  • 1
  • 9
  • 20