Error: ‘You don’t have the level of access necessary to perform the operation you required’

I created a screen flow that includes fields to collect user input and shared that form on a public site, allowing anyone to fill it out. To achieve this, I created a digital experience public site and added a flow screen component to it.

However, when I shared the site link with another user, they received the error ‘You don’t have the level of access necessary to perform the operation you required.‘ In this article, I will explain how to resolve this error and gain access.

Error:

Below, I have provided a screenshot of the error I’m getting when I open the public site to create a record in Salesforce.

Error Post in Salesforce Public Site

Additionally, when external users open the site, they are presented with a login screen, but they don’t have an account on it, and I wanted to fill out that form without logging in.

Allow Permission to Guest User in Salesforce Public Site

Solution:

Below, I will explain the solution so that users can access the public website and create a record in Salesforce.

1. Access Digital Experience Public Site Without Logging in to Salesforce

In the step below, I will explain the solution so that external/guest users can easily create a record without needing to log in to the site.

  • Setup -> All Sites -> click on the Workspace Action for the website you want to make changes to.
  • Click Builder -> go to Settings -> check the checkbox: Guest users can see and interact with the site without logging in.

This allows anyone to create a record in the Salesforce object from a public website.

Change Setting in Digital Experience Site in Salesforce.jpg

2. Provide Correct Active Site Home Page For Public Site in Salesforce

After that, if you open the URL where we deploy the flow, you will see an error stating that ‘You don’t have the level of access necessary to perform the operation you required. Please contact the Owner of the record or the System Administrator.’

This error occurs because the guest user doesn’t have the proper access to the object for which they are creating a record.

To provide access, follow the steps below:

  • Setup -> in Quick Find, search for ‘Site‘ -> open the site in which you are getting an error.
Digital Experience Site Setting in Salesforce

Now you will see the Site Details. Ensure that if you have created a site from the Digital Experience Site, you select CommunitiesLanding in the Active Site Home Page, and if you have created a site using the VisualForce Page, then you need to provide the VF file name.

After that, we need to give object, flow, and field-level access to the guest user. To do this, click the Public Access Settings button.

Enable Site Access for Guest User in Salesforce

3. Give Profile Permission to Guest User License in Salesforce

On the profile, click the Edit button and search for the object for which you want to create a record from the public site. There, you need to provide read and edit access.

Guest User License in Salesforce

After that, navigate to the Field-Level Security section in the same profile and ensure that you have granted all fields access that you added in the flow or VF page.

Give Profile Permissions to Guest License User in Salesforce

4. Enable Flow Access For Guest User License in Salesforce

Now, it is very important that the guest user needs the Flow access to view the screen components we added in the screen flow.

To do this, navigate to the Enables Flow Access section and select the flow for which you want to grant access.

Enable Flow Access to External User in Salesforce

After making all the above changes, reopen the public site from which you want to create the record in the Salesforce object. This time, you will see all the fields you added in the screen flow, and you will also be able to create the record.

Add Flow Component on Digital Experience Public Site in Salesforce

Conclusion

I hope you have got an idea about how we can resolve the  ‘You don’t have the level of access necessary to perform the operation you required‘ error.

In this, I have explained the reasons behind the insufficient access and how to grant access so that users can view the content deployed on the public Salesforce site.

You may like to read:

Agentforce in Salesforce

DOWNLOAD FREE AGENTFORCE EBOOK

Start with AgentForce in Salesforce. Create your first agent and deploy to your Salesforce Org.

Salesforce flows complete guide

FREE SALESFORCE FLOW EBOOK

Learn how to work with flows in Salesforce with 5 different real time examples.