Question 50 — AB-650 Case Study Set
Paideffort currently begins the provisioning script with:
Connect-MgGraph -Scopes "Directory.ReadWrite.All"
The script then creates users from the HR CSV. What should be improved? (Select one answer)
Replace
Directory.ReadWrite.AllwithUser.ReadWrite.Allso the requested scope matches the user-management operation.Replace
Directory.ReadWrite.AllwithUser.Read.Allbecause New-MgUser automatically elevates the session when a write is attempted.Add
GroupMember.ReadWrite.Alland retainDirectory.ReadWrite.Allbecause creating a user automatically creates group memberships.Replace Microsoft Graph authentication with Exchange Online PowerShell because Microsoft Entra users are Exchange recipient objects.
Correct answers
Replace
Directory.ReadWrite.AllwithUser.ReadWrite.Allso the requested scope matches the user-management operation.
Explanations
Correct Answer:
Replace Directory.ReadWrite.All with User.ReadWrite.All so the requested scope matches the user-management operation.
Explanation:
Paideffort's security requirement is to avoid a broad directory-wide permission when a task-specific scope satisfies the operation. The script creates user objects and therefore should use the user-management write scope defined in Paideffort's desired-state manifest.
Wrong Answers:
Replace Directory.ReadWrite.All with User.Read.All because New-MgUser automatically elevates the session when a write is attempted.
Graph PowerShell does not automatically expand the requested permissions when the script performs a write. User.Read.All would fit Paideffort's audit export but not user creation.
Add GroupMember.ReadWrite.All and retain Directory.ReadWrite.All because creating a user automatically creates group memberships.
User creation and group membership are separate Paideffort workflows. The provisioning script does not need group-membership permissions merely because some hires are added to a group later.
Replace Microsoft Graph authentication with Exchange Online PowerShell because Microsoft Entra users are Exchange recipient objects.
Paideffort correctly uses Microsoft Graph PowerShell for bulk Microsoft Entra user creation. Exchange Online PowerShell is required for the separate external mail-contact requirement.