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
Eugene KrEugene Kr 

Site authorization error

Hello guys!


Could you help me please. On my developer account I created a Site and added to it a page. I could go to it without logging in. But, I think after new 20 version, I cannot to go it. I am receiving an error: 



Authorization Required 

You must first log in or register before accessing this page. 
If you have forgotten your password, click Forgot Password to reset it. 



I tryed all info in Site Documentation but it did not help me.

May be you know what is the problem?


Thank you very much for any help!


Try the preview as admin button on the site detail page. Should shed some light on what the error message is.

super developersuper developer

You Need give permissions  to get in sites.


First enable the vf page in sites. And give permissions in public access settings which object you are going to use in vf (Create,read...).


Try this


Make sure Field level security is set as visible in public access settings for the fields you are exposing on that page.

super developersuper developer

Hi Pradeep,


Do you know more about sites then see below link and help me please.

Eugene KrEugene Kr

Thank you for your helping guys! :smileyhappy:


I reached accessing to my page. And have following interesting issue: The page has a button which action returns null, so there are loading the same page, but without URL parameters, and I am receiving the same 'authorization error' again.


I switched on full acces on all objects which used in controller of the page. And what is interesting the URL without parameters works fine first (not after button clicking, independently...).


What is the issue? Do not you know?


Thank you for any relies!

super developersuper developer

In vfpage put button attribute 


<apex:commandbutton immediate=true..../>

check once again permissions.

try this.





I am have a similar program while inserting data into Lead through "Flow". I checked all the fields are visible in field-level security and almost none are read only. I dont know why when i am accessing my site which has vf page and this vf page internally executes flow... but at a step where Leads are getting inserted it fails and says authorization required. please help!