AZ-500 Exam QuestionsBrowse all questions from this exam

AZ-500 Exam - Question 472


HOTSPOT -

What is the membership of Group1 and Group2? To answer, select the appropriate options in the answer area.

NOTE: Each correct selection is worth one point.

Hot Area:

Show Answer
Correct Answer:

Box 1: User1, User2, User3, User4

Contains "ON" is true for Montreal (User1), MONTREAL (User2), London (User 3), and Ontario (User4) as string and regex operations are not case sensitive.

Box 2: Only User3 -

Match "*on" is only true for London (User3) as 'London' is the only word that ends with 'on'.

Scenario:

Contoso.com contains the users shown in the following table.

Contoso.com contains the security groups shown in the following table.

References:

https://docs.microsoft.com/en-us/azure/active-directory/users-groups-roles/groups-dynamic-membership

Discussion

17 comments
Sign in to comment
AdnanEzzi
Apr 21, 2020

The answer is correct. Group 1 - U1, U2, U3 & U4 AND for Group 2 - U3.

CASGTI
Apr 25, 2021

Tested in lab.. >>> -match "*on" >>> is an incorrect expression, it will not allow you to save the this, so the group will not contain any members. ... valid expression could be ".*on" (with a dot in front) ... so make sure in exam you see the dot, if no dot ... then, no members.

dorinh
May 9, 2021

you're right, the syntacx is evaluated only on this format (user.displayName -match ".*as")

Sam_997
Mar 22, 2022

In the exam its - Match "on" no dot selected no members

ITFranz
Dec 20, 2023

To back the CASGTI. https://learn.microsoft.com/en-us/entra/identity/users/groups-dynamic-membership Using the -match operator The -match operator is used for matching any regular expression user.displayName -match ".*vid"

Ivan80
Jan 30, 2024

In exam 1/28/24

RemmyT
May 7, 2024

Passed. Exam duration 100 min + 20. On the Microsoft site: https://learn.microsoft.com/en-us/credentials/certifications/azure-security-engineer/?practice-assessment-type=certification You will have 100 minutes to complete this assessment. Last Updated 04/30/2024 55 questions (46+9) contoso, 6 questions This question in exam (study case) My answer Group1: User1, User2, User3, User4 Group2: User1, User2, User3, User4 New 3 or 4 questions VM1, SQL1, VNET1, AKS in Google Cloud. What items are protected by Microsoft Defender & default period scan.

zellck
May 10, 2023

Gotten this in May 2023 exam.

AzureAdventure
Sep 23, 2023

I tested it with this script # Define an array of colors $colors = "RED", "Green", "Blue" # Check if "Red" exists in the array (case-sensitive) if ($colors -contains "Red") { Write-Host "The array contains 'Red'." } else { Write-Host "The array does not contain 'Red'." } # Check if "red" exists in the array (case-sensitive) if ($colors -contains "red") { Write-Host "The array contains 'red'." } else { Write-Host "The array does not contain 'red'." } if ($colors -match "red") { Write-Host "The array match 'red'." } else { Write-Host "The array does not match 'red'." } *************************** Console shows this result The array contains 'Red'. The array contains 'red'. The array match 'red'. **************************** My conclusion is Group 1 => U1,U2,U3,U4 Group2 => U1, U2,U3,U4

AzureAdventure
Sep 23, 2023

https://learn.microsoft.com/en-us/azure/active-directory/enterprise-users/groups-dynamic-membership#:~:text=String%20and%20regex%20operations%20aren%27t%20case%20sensitive.

hfk2020
Oct 31, 2023

Tested in lab. Group1 is: User1, User2, User3, User4 Group2 is: User1, User2, User3, User4 (With -macth "on" and with -match ".*on")

Atilgen
Mar 29, 2024

Also tested it and same result.

Codelawdepp
Jun 20, 2024

Tested in Lab! correct answer: Group1: User1, User2, User3, User4 Group2: User1, User2, User3, User4 user.city -contains "ON" = and user.city -match "on" are not case sensitive and will show the same result. But looks like the -match command is more flexible. Contains: user.city -contains "ON" = ok user.city -contains ".*ON" = error1 user.city -contains ".ON" = error1 user.city -contains "*ON" = error1 user.city -contains "*.ON" = error1 Match user.city -match "on" = ok user.city -match ".*on" = ok user.city -match ".on" = ok user.city -match "*on" = error2 user.city -match"*.on" = error2 error1: Dynamic membership rule validation error: Invalid operator. Invalid operator '-contain' error2: Unable to complete due to service connection error. Please try again later. (its not a temporary error ;-)

timHAG
Jul 13, 2024

what was the results for ? is it only ?User 3 - London? user.city -match ".*on" = ok user.city -match ".on" = ok

wardy1983
Nov 22, 2023

Explanation: Box 1: User1, User2, User3, User4 Contains "ON" is true for Montreal (User1), MONTREAL (User2), London (User 3), and Ontario (User4) as string and regex operations are not case sensitive. Box 2: Only User3 - Match "*on" is only true for London (User3) as 'London' is the only word that ends with 'on'.

RemmyT
May 3, 2024

Tested in lab The two membership conditions are case insesitive and give the same result (the same memberhip for the test groups). All give the same result. (user.city -match "on") (user.city -match ".*on") (user.city -contains "ON") Group1: User1, User2, User3, User4 Group2: User1, User2, User3, User4 It's not valid expression: Failed to save group. Failed to save dynamic group. (user.city -match "*on") (user.city -match "*.on")

Amnesia
Jun 24, 2023

is the "-match" operator case-sensitive ?

epomatti
Jan 5, 2024

No, all string operations are case insensitive.

massnonn
Jul 8, 2023

user.displayName -match "Da.*" Da, Dav, David evaluate to true, aDa evaluates to false. Therefore in this case -match "on" there are no match for group 2

TheProfessor
Oct 9, 2023

According to the question, Group 2: No Members

TheProfessor
Oct 9, 2023

It should return Group2 => U1, U2,U3,U4 Only User3 will be if the expression ".*on".

_punky_
Oct 17, 2023

both are case insesitive where one is classical substring match "contains" and 2nd is regex match(/ig). Both will give the same output

husam421
Jan 12, 2024

The answer is U1 U2 U3 and U4 four both The -match operator is used for matching any regular expression. Examples: Copy user.displayName -match "^Da.*" Da, Dav, David evaluate to true, aDa evaluates to false.

Drew294
Jul 4, 2024

Agree with the answers users 1-4 for each answer section https://learn.microsoft.com/en-us/entra/identity/users/groups-dynamic-rule-more-efficient. The relevant section Minimize the usage of the match operator in rules as much as possible. Instead, explore if it's possible to use the startswith or -eq operators. Considering using other properties that allow you to write rules to select the users you want to be in the group without using the -match operator. For example, if you want a rule for the group for all users whose city is Lagos, then instead of using rules like: user.city -match "ago"

saira23
Jul 20, 2024

This case study was in Exam 19/07/2024 I Selected users 1234 for both groups.