function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

What causes Authorization Page to appear?

I am building a public site in salesforce and when I have outside people test the site they keep getting a Authorizatoin Needed page. When I do it in my sandbox I don't get any errors. What could I be missing? What causes this page to come up? 


Assuming you don't have any pages that you are trying to secure against public access, I've found this is usually down to page/object/field security.


Sites need more attention than most aspects of salesforce, and anywhere you are lacking in configuration of this nature results in the authorization page, as the assumption is that items are excluded from public access but wil be available to logged in users.


I've found that its best to turn on debug logging for the guest user associated with your site - this should help you to track down where the problem lies.


The Authorization Page will be displayed in the event of any error at all being generated by the page. This means any blown governor exceptions, unchecked exceptions, uncaught DML validation failures, anything at all that suggests a non-normal VF condition will cause the user to be redirected to this error page.

Vanessa BarrosVanessa Barros


Are you making with force site right?

when someone try to access your page, the salesforce uses a profile "Guest User License". if this profile dont have permission to that page, you have this error.


I usually get the error page when I change somthing on one of the pages and someone tries to access it right away. Would that cause that kind of problem.


I wouldn't expect that, as it sounds like a race condition.  So if a user tries to access the page straight away they get the error, but if they wait a period of time (any idea how long that is) then the page renders correctly?


That's not something I've seen before - generally when I change a page the next time a user accesses it, the page takes longer than usual to render (presumably because things are being rebuilt) but it comes back okay.