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
Mohit Sharma 397Mohit Sharma 397 

INSUFFICIENT_ACCESS: use of the Metadata API requires a user with the ModifyAllData or ModifyMetadata permissions

Hi Connections,
I am getting below error while retrieve data from vs code. can somebody please help me out to resolve this issue. I got this error first time.

here is error
INSUFFICIENT_ACCESS: use of the Metadata API requires a user with the ModifyAllData or ModifyMetadata permissions.

Thanks in advance

Sai PraveenSai Praveen (Salesforce Developers) 
Hi Mohit,

you need to have access to metadata type for your profile
 
please check the screenshot and see if your profile has access to those metadata types 

Let me know if you face any issues.

If this solution helps, Please mark it as best answer.

Thanks,
ravi soniravi soni
Hi Mohit,
can you please check your profile ? you have assigned right profile or standard profile ? if you have standard profile like standard user or another one then you can get this type of error.

let me know if my suggestion is helpful to you and if yes then please mark it as the best answer so that it could help to othes.
Thanks
 
Shri RajShri Raj
The error message "INSUFFICIENT_ACCESS: use of the Metadata API requires a user with the ModifyAllData or ModifyMetadata permissions" indicates that the user attempting to retrieve data from the Metadata API does not have sufficient permissions.
To resolve this issue, you need to ensure that the user has either the "ModifyAllData" or "ModifyMetadata" permission. This can be accomplished by doing the following:
Log in to your Salesforce instance as an administrator.
Go to the "Setup" menu and navigate to "Users."
Find the user who is encountering the error and click on their name to view their profile.
In the profile, navigate to the "Permission Sets" section.
Click on the "Edit" button next to the relevant permission set.
Scroll down to the "System" section and locate the "Modify All Data" or "Modify Metadata" permission.
Enable the permission by clicking the checkbox next to it.
Save the changes to the permission set.
This should give the user the necessary permissions to retrieve data from the Metadata API. If you are still encountering issues, it may be helpful to consult the Salesforce documentation or reach out to Salesforce support for further assistance.