Print this page

Force.com sites Authorization Required error

Knowledge Article Number 000230066
Description Attempts to access a Force.com may return Authorization Required error for a number of reasons, including:
  1. The page you are trying to access is part of a managed package, and the guest user does not have the appropriate managed package license.
  2. The Visualforce page you are trying to access has an error. 
    • When a Visualforce page has an error that does not have a Visualforce page assigned, the system attempts to return a standard page with details on the error.
    • Force.com sites guest users cannot access standard pages, only Visualforce pages that have been added to the Site Visualforce Pages list for that site.
    • This in turn results in an Authorization Required error, which by default has the Visualforce page "Unauthorized" assigned to it.
Resolution Troubleshooting the Authorization Required error:
  1. If your site is using managed packages, to check the Sites Guest User managed package licenses:
    • User Permissions needed: "Manage Users" and "Manage Package Licenses"
    • Go to Setup > Develop > Sites > your site.
    • Click "Public Access Settings" button.
    • Click "View Users" button.
    • Click on the Sites Guest User to view the user details page.
    • Scroll down to Managed Packages.
    • Click the "Assign Licenses" button.
    • Assign the license(s) for the managed package(s) you are using for that site.
  2. To determine if the problem is due to an error in the Visualforce page: 
  • Enable debug logs for the sites guest user, attempt to access the page again to capture the debug logs, and then view the debug logs.
  • If debug logs aren't giving the information you need:
    • Return to the site detail page (Setup > Develop > Sites > your site)
    • Click "Preview as Admin" to the left of the site's URL with developer mode enabled (on your user record).
    • When the "Authorization Required" page loads, it should state the type of error toward the bottom of the page if it is the result of an error in the Visualforce page.




promote demote