Verify that That 'Guest users access restrictions' is set to 'Guest user access is restricted to properties and memberships of their own directory objects'

Framework Reference: A.5.15 Integration: Azure – Microsoft Entra ID (formerly Azure AD)

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

  1. Navigate to Microsoft Entra ID
  2. Under Manage, select External Identities
  3. Click External collaboration settings
  4. 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"
  5. Click Save
  6. 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


Further resources

Was this article helpful?