Verify that That 'Guest users access restrictions' is set to 'Guest user access is restricted to properties and memberships of their own directory objects'
Why this matters
Guest users can pose a security risk if granted unnecessary visibility or access to directory objects. Without proper restrictions, guest users might enumerate directory data, group memberships, or be assigned elevated privileges. This check ensures that guests can only view their own directory object, following the principle of least privilege.
What this check does
Check Logic
Validate that the GuestUserRoleId
is set to 2af84b1e-32c8-42b7-82bc-daa82404023b
, which corresponds to the most restrictive level: guest users only have access to their own directory objects.
Applies to
- Microsoft Entra ID (formerly Azure Active Directory)
How to fix it
Azure Portal
- Navigate to Microsoft Entra ID
- Under Manage, select External Identities
- Click External collaboration settings
- Under Guest user access, set the Guest user access restrictions option to:
"Guest user access is restricted to properties and memberships of their own directory objects" - Click Save
- Azure CLI
PowerShell
Connect-MgGraph
Update-MgPolicyAuthorizationPolicy -GuestUserRoleId "2af84b1e-32c8-42b7-82bc-daa82404023b"
# Verify the setting
(Get-MgPolicyAuthorizationPolicy).GuestUserRoleId
Ensure the output matches:
2af84b1e-32c8-42b7-82bc-daa82404023b
Exceptions
None