0

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?

1
  • goto to new profile page, click 'Enabled Visualforce Page Access', click edit, add pages you want to be accessible Commented Jul 16, 2016 at 18:39

1 Answer 1

3

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

3
  • 2
    For this one, it's obviously the Visualforce page that's the security issue. If there's an Apex Controller for the page, that needs to give permissions to users as well
    – Jagular
    Commented Jul 16, 2016 at 18:58
  • Great, that worked. Do you have any suggestions for making this change when the package is installed so the organization admin doesn't have to worry about it? @mkorman Commented Jul 18, 2016 at 21:27
  • I would add a permission set to your package, giving access to that apex page. The sys admin would still have to assign the permission set. OR tell him to install the package for all users or for the selected profiles. Not 100% sure about the latter so I would test it first
    – mkorman
    Commented Jul 18, 2016 at 22:48

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .