MD-102 practice question 33 of 35

You have a Microsoft 365 E5 subscription. You need to create a dynamic device group that will contain any device that has the word Marketing in its name. Which device membership rule should you use?

Full set: 393 questions

Domain Manage identity and compliance

Answer options
A:

A. (device.displayName -in "Marketing")

B:

B. (device.displayName -in "*Marketing*")

C:

C. (device.displayName -contains "Marketing")

Correct answer
D:

D. (device.displayName -contains "*Marketing*")

Correct Answer:
C. C. (device.displayName -contains "Marketing")
Explanation

The -contains operator is the correct choice for creating a dynamic membership rule that performs a substring match. This operator evaluates to true if the attribute's value (in this case, device.displayName) contains the specified string ("Marketing"). This rule will successfully add any device with "Marketing" anywhere in its display name to the group, fulfilling the requirement.

Why Incorrect

A. The -in operator is used to match an attribute's value against a collection of exact string values, not to find a substring within a single string.
B. The -in operator does not support wildcards () for substring matching. It would attempt to find a device with the literal name "Marketing".
D. The -contains operator does not require or support wildcards (). The operator itself implies a substring search, making the wildcards redundant and incorrect syntax.

References

1. Microsoft Entra ID Documentation

"Dynamic membership rules for groups in Microsoft Entra ID":

Section: "Supported rule operators"

Content: The documentation lists -contains as an operator for string properties. The description for -contains is "String contains value." This confirms it is used for substring matching. The documentation for -in states it "Matches value in collection

" confirming it is for exact matches against a list.

Reference: Microsoft Learn. (2023). Dynamic membership rules for groups in Microsoft Entra ID. Retrieved from https://learn.microsoft.com/en-us/entra/identity/users/groups-dynamic-membership#supported-rule-operators

Scroll to Top