nerdexam
Microsoft

MD-102 · Question #520

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?

The correct answer is C. (device.displayName -contains "Marketing"). In Azure AD dynamic group membership rules, the -contains operator performs a substring match - it checks whether the property value contains the specified string anywhere within it. The correct rule is (device.displayName -contains "Marketing"), which returns true for any…

Submitted by mike_84· Apr 18, 2026Manage and maintain devices

Question

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?

Options

  • A(device.displayName -in "Marketing")
  • B(device.displayName -in "Marketing")
  • C(device.displayName -contains "Marketing")
  • D(device.displayName -contains "Marketing")

How the community answered

(27 responses)
  • A
    4% (1)
  • B
    4% (1)
  • C
    78% (21)
  • D
    15% (4)

Explanation

In Azure AD dynamic group membership rules, the -contains operator performs a substring match - it checks whether the property value contains the specified string anywhere within it. The correct rule is (device.displayName -contains "Marketing"), which returns true for any device name that includes the word 'Marketing'. Option A and B use -in, which checks if the property value exactly matches one of a list of values, not a substring - it does not support wildcard or partial matching. Option D incorrectly combines -contains with asterisk wildcards; the -contains operator does not use wildcards and the literal asterisks would be treated as part of the search string, breaking the match.

Topics

#Azure AD dynamic groups#Device membership rules#displayName filtering#Group management

Community Discussion

No community discussion yet for this question.

Full MD-102 Practice