[SalesForce] “Insufficient privileges” error when trying to access visualforce page

We developed a visualforce page and tested it with a System Administrator account and it works fine. Now we created a new "Standard User" account and try to access the same page and get this error:

Insufficient Privileges
You do not have the level of access necessary to perform the operation you requested. Please contact the owner of the record or your administrator if access is necessary. For more information, see Insufficient Privileges Errors.

We tried simplifying the page completed to just the following code but the error persists:

<apex:page >
 hello world

</apex:page>

Any insight?

Best Answer

You need to give permissions to see the VF page to the user.

You can either add it to the "Standard User" profile or create a permission set for it. The former is easier:

  • Setup > type "Profiles", click on it to select
  • Click on "Standard User"
  • At the top, click the link "Enabled VisualForce page access"
  • Click on the "Edit" button
  • Select the page(s) you want to give access
  • Click "Save"

Your user should be able to view the page now

Related Topic