Home › SharePoint Online › 403 Forbidden

SharePoint Online · 403 Forbidden · Microsoft 365 / SharePoint Online

SharePoint Online Error 403 Forbidden in Microsoft 365

User lacks permission to access SharePoint site due to missing group membership or restrictive policies; resolve by granting permissions via Site settings.

Error Details

FactValueSourceNote
Exact error stringHTTP 403 ForbiddenBrowser console-> Access Denied
Affected build rangeMicrosoft 365 / SharePoint OnlineOS Build Information
Registry key or OMA-URI involved
Relevant service/endpoint URLhttps://<tenant>.sharepoint.com/sites/<site>SharePoint Admin Center > Reports > Usage-> Site usage
Log line signatureAudit Log - SharePoint operations AccessDeniedMicrosoft 365 compliance center > Audit > Search

Log Files to Check

What This Error Actually Means

The HTTP 403 Forbidden error is a standard web server response code indicating that the user's request has been understood but access to the requested resource is forbidden. In the context of SharePoint Online, this means that despite being authenticated and logged in, the user lacks sufficient permissions to access the specific site, library, list, or item they are trying to reach. This error can be raised by various components within SharePoint Online, including permission management services, Conditional Access policies, and sensitivity labels.

Affected Versions and Scope

This issue affects all versions of Microsoft 365 / SharePoint Online where users attempt to access restricted resources without proper permissions. It is not version-specific but rather configuration-dependent. The error does NOT occur in environments where users have been granted the necessary permissions or where Conditional Access policies do not restrict access based on user attributes, device compliance status, or location.

Where To Look First: Logs and Event IDs

To diagnose a 403 Forbidden issue, start by examining the Unified Audit Log (UAL) in the Microsoft 365 Compliance Center. This log captures all SharePoint operations that result in access denial, which is crucial for understanding why users are being blocked from accessing certain resources. The exact log line to grep for in the UAL would be:
Audit Log - SharePoint operations AccessDenied
Additionally, check sign-in logs within Microsoft Entra ID (formerly Azure AD) to confirm that authentication was successful but access was denied. The relevant service/endpoint URL is typically of the form https://.sharepoint.com/sites/.

Root Causes

User Not Added to Permission Groups

One common cause is simply that the user has not been added to the appropriate permission groups for the site, such as Members, Visitors, or Owners. This can be verified by checking the SharePoint admin center > Sites > Active sites > [site] > Membership.
Warning: Modifying group memberships directly in the SharePoint UI may affect multiple users and should be done with caution.

Conditional Access Policy Blocking Session

Another frequent cause is a Conditional Access policy that blocks access based on device compliance, multi-factor authentication (MFA) requirements, or location restrictions. Review these policies in the Microsoft Entra ID admin center to ensure they are not overly restrictive.

Sensitivity Label or Information Barrier Policy Restricting Access

Sensitivity labels and information barrier policies can also prevent users from accessing certain documents or sites if their role does not permit it based on data sensitivity classifications. Check these settings in the SharePoint admin center > Policies > Sensitivity Labels and Information barriers.

Site Collection Administrator Removed User Explicitly

If a user was previously granted access but is now blocked, it could be because they were explicitly removed by a site collection administrator. This can be checked via the SharePoint UI or PowerShell cmdlets for more granular control.

Fix Procedure

To resolve HTTP 403 Forbidden errors, follow these steps:
  1. Add User to Permission Groups:
    • Navigate to the site settings > Site permissions > Grant permissions.
    • Alternatively, use PowerShell cmdlets to add users programmatically:
      $siteUrl = "https://tenant.sharepoint.com/sites/sitecollection"
      $groupId = (Get-PnPSiteGroup -Site $siteUrl | Where-Object { $_.Title -eq 'Members' }).Id
      Add-PnPUserToGroup -LoginName "[email protected]" -GroupId $groupId
  2. Review and Adjust Conditional Access Policies:
    • Go to Microsoft Entra ID > Admin center > Conditional access.
    • Identify policies that might be blocking users based on device compliance, MFA requirements, or location.
    • To modify a policy using PowerShell:
      $policy = Get-AzureADMSConditionalAccessPolicy -Id "guid-of-policy"
      $policy.EnforcedGrantControls.Add("mfa")
      Set-AzureADMSConditionalAccessPolicy -ObjectId $policy.Id -ConditionalAccessPolicy $policy
  3. Check and Apply Sensitivity Labels:
    • Navigate to SharePoint admin center > Policies > Sensitivity labels.
    • Ensure that users have the appropriate permissions based on their role and data sensitivity requirements.
  4. Re-grant Unique Item Permissions:
    • If unique item permissions are breaking inheritance, re-apply group-level permissions to restore access:
      $listItem = Get-PnPListItem -List "Documents" -Identity 1
      $siteUrl = $listItem.FieldValues["FileDirRef"]
      Set-PnPListItemPermission -List "Documents" -Identity 1 -User "[email protected]" -AddRole "Edit"

Error Code Variants

CodeDescriptionDistinguishing Factors
401 UnauthorizedUser is not authenticated.No authentication cookie or token present in the request.
403 ForbiddenUser lacks necessary permissions.Authentication successful but access denied based on role, policy, or unique item permissions.
500 Internal Server ErrorServer-side issue preventing resource access.Generic server error unrelated to user authentication or permissions.

Verification

After applying the fixes, verify that users can now access the previously restricted resources. Check the Unified Audit Log for entries indicating successful access attempts:
Audit Log - SharePoint operations AccessGranted
Additionally, ensure that sign-in logs in Microsoft Entra ID show no further 403 errors.

Prevention

To prevent recurrence of HTTP 403 Forbidden errors, establish and enforce clear permission management policies. Use PowerShell scripts to automate the propagation of group memberships across large organizations:
$group = Get-AzureADGroup -ObjectId "guid-of-group"
$members = Get-AzureADGroupMember -ObjectId $group.ObjectId
foreach ($member in $members) {
    Add-PnPUserToGroup -LoginName $member.UserPrincipalName -GroupId $group.ObjectId
}
Also, regularly review and update Conditional Access policies to ensure they do not inadvertently block legitimate access.

Sources & References

Related Guides

Get new error code fixes by email

Product-specific solutions for Intune, Autopilot, SCCM and Entra ID — straight to your inbox. No spam.