You are modifying a web application so that it uses Azure Active Directory to manage users. You create a
security group named Users and a security group named Administrators. The Administrators security group is a
member of the Users security group.
You create the following code segment. Line numbers are included for reference only.
You need to implement the canAccessUserResources function.
Which code segment should you insert at line 02?
A.
Option A
B.
Option B
–
C.
Option C
D.
Option D
B
0
0
a bit confused. either A or D
https://msdn.microsoft.com/en-us/library/azure/ad/graph/api/users-operations#GetUsersMemberships
https://msdn.microsoft.com/en-us/library/azure/ad/graph/api/groups-operations#GetGroupMembers
0
0
I would say D
0
0
I think it is A.
https://msdn.microsoft.com/en-us/library/azure/ad/graph/api/users-operations#GetUsersMemberships
https://graph.windows.net/myorganization/users/{user_id}/$links/memberOf?api-version
The $links variable if optional.
0
0
B
https://msdn.microsoft.com/en-us/library/azure/ad/graph/api/functions-and-actions#ismemberof
0
0
The answer is B.
A: The code looks valid, and the logic looks sound. However the MemberOf property only returns direct group memberships, and the ‘Administrators’ group is nested under the ‘Users’ group.
B: The code looks valid and the logic looks sound. The isMemberOf function provides a transitive lookup of a user to a group.
C: The code is incorrect on line 1, as it attempts to lookup the groupID of the group ‘User’. The group in this question however is named ‘Users’.
D: The code looks valid, and the logic looks sound. However the Members property only returns direct group memberships, and the ‘Administrators’ group is nested under the ‘Users’ group.
0
0
Answer C is the only answer that will never return the desired result
Both A and D will return the correct result, but only if the user is directly a member of Users. If the user is a member of Administrators which is a member of users they will not show the user a member because they are not transitive.
Answer B is Correct
It returns where the user is a member of a group and is transitive.
https://msdn.microsoft.com/en-us/library/azure/ad/graph/api/functions-and-actions#isMemberOf
0
0