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:
Suggested 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
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.
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"
match and contains differs in a way that match supports regular expressions, but in this example - they work the same. both are case insensitive and saying "there is a match for 'on'' and "it contains 'on'" - are equivalent.
it will be u1,2,3,4 for both
Group 1 = U1, U2, U3, U4 -> contains use case-insesitively and find the exact substring
Group 2 = U3 -> match use regex and is case-sensitive. The only one user city ending with exact match ending with "on"
The solution looks OK, IF we assume that it says ".*on"-->
Using the -match operator
The -match operator is used for matching any regular expression. Example(for this question):
user.displayName -match ".*vid" --> David. Therefore--".*on" --> London.
In our exercise, there is just -match "on" --> the same with -contains "on" -->U1/2/3/4 for both.
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"
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 ;-)
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.
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")
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.
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'.
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
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
This section is not available anymore. Please use the main Exam Page.AZ-500 Exam Questions
Log in to ExamTopics
Sign in:
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
AdnanEzzi
Highly Voted 5 years, 1 month agoCASGTI
Highly Voted 4 years, 1 month agoITFranz
1 year, 5 months agonExoR
10 months, 1 week agoSam_997
3 years, 2 months agodorinh
4 years, 1 month agommmyo
Most Recent 1 month agoschpeter_091
7 months, 1 week agosaira23
11 months agoDrew294
11 months, 2 weeks agoCodelawdepp
12 months agotimHAG
11 months, 1 week agoRemmyT
1 year, 1 month agoRemmyT
1 year, 1 month agoIvan80
1 year, 4 months agohusam421
1 year, 5 months agowardy1983
1 year, 6 months ago[Removed]
1 year, 7 months agoAtilgen
1 year, 2 months ago_punky_
1 year, 8 months agoTheProfessor
1 year, 8 months agoTheProfessor
1 year, 8 months agoAzureAdventure
1 year, 8 months agoAzureAdventure
1 year, 8 months agomassnonn
1 year, 11 months ago