Loading

'Authorization Required' error on Lightning Platform sites

Publiceringsdatum: Jun 3, 2026
Beskrivning

An authorization error in Salesforce means a user or guest user does not have permission to access or perform a specific action, even if they are authenticated. On Salesforce Lightning Platform sites (formerly Force.com sites), attempts to access a page may return an "Authorization Required" error for several reasons.
Common causes include:

  1. The page is part of a managed package, and the site's guest user does not have the appropriate managed package license assigned.
  2. The Visualforce page has an error. When a Visualforce page error does not have a Visualforce error page assigned, Salesforce attempts to return a standard error page. However, Force.com site guest users cannot access standard Salesforce pages — they can only access Visualforce pages that have been added to the site's Visualforce Pages list. This causes the system to return an "Authorization Required" error using the default Unauthorized Visualforce page.
Lösning

 

Troubleshooting Managed Package License Issues

If your Force.com site uses managed packages, the site's guest user may need a managed package license. To check and assign managed package licenses to the site guest user:

  1. Ensure you have the "Manage Users" and "Manage Package Licenses" permissions.
  2. Go to Setup > Develop > Sites > select your site.
  3. Click the "Public Access Settings" button.
  4. Click the "View Users" button.
  5. Click on the Sites Guest User to open the user detail page.
  6. Scroll down to the Managed Packages section.
  7. Click the "Assign Licenses" button and assign the license for each managed package used by the site.

Troubleshooting Visualforce Page Errors

If the error is caused by a Visualforce page error, use the following steps:

  1. Enable debug logs for the site's guest user and attempt to access the page to capture the debug log. Review the log for errors.
  2. If debug logs do not provide enough information, use the Preview as Admin feature. Return to the site detail page (Setup > Develop > Sites > select your site) and click "Preview as Admin" with developer mode enabled on your user record. When the Authorization Required page loads, it displays the type of error at the bottom of the page if it is caused by a Visualforce page error.

The Preview as Admin feature allows administrators to view Force.com site pages as an admin user to diagnose errors that the guest user cannot describe. It is available on the site detail page in Setup.

 

Knowledge-artikelnummer

000386094

 
Laddar
Salesforce Help | Article