Cloud Β· Microsoft Azure Β· Certifications
AZ-500: Dynamic group membership rules
Select one answer. Your result and the explanation will appear immediately.
Question 10
You need to configure dynamic group membership based on users' City attribute. USER1 has Toronto, USER2 has Montreal, USER3 has London, and USER4 has Ontario. Group1 uses (user.city -contains "ON") and Group2 uses (user.city -match "on"). What will be the membership of Group1 and Group2 after the rules are applied?
Correct answer: GROUP1: USER1, USER2, USER3, USER4 / GROUP2: USER1, USER2, USER3, USER4
The -contains operator performs a case-insensitive substring check for string properties, and -match uses a case-insensitive regular-expression match by default. Every listed city contains the sequence "on": Toronto, Montreal, London, and Ontario. Therefore, all four users are included in both groups.
Exam clue: Do not treat "ON" and "on" as case-sensitive here. Check each city for the substring, not only its starting letters.
Remember: In dynamic membership rules, string -contains is case-insensitive and -match is case-insensitive unless you use the case-sensitive variants. Both can match a substring within the attribute value.