Courseiva
Implement and Manage User IdentitiesmediumMultiple ChoiceObjective-mapped

SC-300 Implement and Manage User Identities Practice Question

You are creating a dynamic user group in Microsoft Entra ID to automatically include all users from the Marketing department who are located in either London or Paris. Which syntax should you use for the membership rule?

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

(user.department -eq "Marketing") -and (user.city -in ["London", "Paris"])

Dynamic groups use a rule-based system to manage membership automatically, which is essential for scaling identity management in large organizations. Mastering the syntax for these rules allows administrators to ensure that users receive the correct access to resources and applications based on their current attributes without manual intervention by the IT staff.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • (user.department -eq "Marketing") -and (user.city -in ["London", "Paris"])

    Why this is correct

    The '-in' operator is the most efficient way to match a property against a specific list of multiple values within Entra ID dynamic membership rules. Combining this with the '-and' operator ensures that only users who meet both the department and city criteria are included in the group.

  • (user.department -match "Marketing") -or (user.city -eq "London") -or (user.city -eq "Paris")

    Why it's wrong here

    Using the '-or' operator between the department and city attributes would incorrectly include every person in London or Paris, regardless of their department. Additionally, the '-match' operator is generally used for regex patterns and is less performant than the standard equality operator for simple string comparisons.

  • user.department -eq "Marketing" -and user.city -eq "London" -and user.city -eq "Paris"

    Why it's wrong here

    This rule logic is flawed because a single user's city attribute cannot be both 'London' and 'Paris' simultaneously. The query would return zero results because the conditions are mutually exclusive, demonstrating why logical grouping and the correct selection of operators are vital for functional dynamic group rules.

  • user.department -contains "Marketing" -and user.city -contains "London, Paris"

    Why it's wrong here

    The '-contains' operator is intended for multi-value collection properties, such as group memberships, rather than single-string attributes like department or city. Furthermore, passing a comma-separated string to this operator will not search for individual cities, resulting in a failed rule that does not populate members.

About these practice questions

This SC-300 question is part of Courseiva's 17-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written and reviewed by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

Last reviewed September 2026 · checked against the official Microsoft exam blueprint

This SC-300 practice question is part of Courseiva's free Microsoft certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the SC-300 exam.