Dynamic Device Group Rule for Marketing Name

Add devices to Microsoft Entra ID
Answer Correct answer: C — Use the -contains operator to match devices with 'Marketing' in their display name.

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?

  1. (device.displayName -in "Marketing")
  2. (device.displayName -in "Marketing")
  3. (device.displayName -contains "Marketing") Correct Answer
  4. (device.displayName -contains "Marketing")

Community Votes

C
100%

100% of anonymous learners picked answer C. Votes are pick records left by other test-takers — they are not the verified answer.

Community Insight

This question tests knowledge of Azure AD dynamic group membership rule operators, specifically distinguishing between substring matching (-contains) and exact/in-list matching (-in).

Learn how to create a dynamic device group in Microsoft Intune that matches devices containing 'Marketing' in their name. This page establishes the correct syntax using the -contains operator without wildcards.

Users often incorrectly use the -in operator with wildcards or add asterisks to the -contains operator, which is not valid syntax for this context.

Community Discussion (3 comments)

Meek_Learner 👍 1 Selected: C
• The -contains operator checks if a string includes a specific substring, regardless of whether the letters are uppercase or lowercase. For example, it would find "Marketing" in "Marketing Department", "marketing_team", and "Sales & Marketing". • You’re looking for the substring "Marketing" (no wildcards needed). The -contains operator automatically checks if this string is part of the device name.
Moot2 👍 2 Selected: C
C is correct https://learn.microsoft.com/en-us/entra/identity/users/groups-dynamic-membership
HvD 👍 2 Selected: C
Agreed

Comments & Corrections

No comments yet — spotted an error or have a note? Share it below.

Log in to comment, report an error, or add a note about this question.

Submitted for moderation before publishing. Keep it helpful and respectful.

Expert Analysis

Why the Answer Is Correct

The correct syntax for filtering by a substring in a dynamic group is using the -contains operator directly on the property value. The expression (device.displayName -contains "Marketing") correctly identifies any device where the display name includes the word "Marketing" anywhere within the string.

Why the Other Options Are Wrong

Option A uses -in, which expects a list of exact values, not a substring search. Option B incorrectly combines -in with wildcard characters, which are not supported in this manner. Option D adds unnecessary wildcards to the -contains operator; the operator inherently checks for inclusion, so adding * makes it invalid syntax.

Community Comment Notes

Community members confirm that -contains is the standard approach for substring matching. As one user noted, "C is correct" referencing official documentation, while others emphasized that wildcards are not needed with -contains.

Official Reference

Exam Strategy

Memorize the specific operators used in Azure AD dynamic groups: -eq for equality, -ne for not equal, -contains for substrings, and -in for lists of exact values. Do not mix them with SQL-style wildcards.

Frequently Asked Questions

Why can't I use wildcards like *Marketing*?

The -contains operator natively supports substring matching, so wildcards are redundant and cause syntax errors.

What is the difference between -contains and -in?

-contains checks if a value is a substring of another, while -in checks if the value exists in a predefined list of exact strings.

Related Analysis

Practice All MD-102 Questions

Access 92 questions with complete answers and detailed explanations.

View Full MD-102 Practice Test →

← Back to MD-102 Study Guide