What to do, when facing deployment Fatal Error INSUFFICIENT_ACCESS: insufficient access rights on entity: LightningComponentBundle?
I came across this issue, when I am switching deployment user from an actual user having an end user license and system admin access, to a least privileged deployment integration user with
- User License = Salesforce Integration, and
- Profile = Minimum Access - API Only Integrations, and
- assigned a permission set with the least amount of permissions to do the job.
I needed to deploy a set of lightning web components, hence the error on LightningComponentBundle.
I was however not sure why the error was thrown, and it was also not specified which specific component was causing the
fatalerror.
Solution:
While it was not intuitive for me, adding
Customize Applicationto the permissions set assigned to the deployment integration user, this resolved the issue.
So do note, even if the description for Customize Application is "Customize the organization using App Setup menu options.", it actually covers customizations with Lightning Web Components also.
#Deployment Error #Permissionset #Lightning Web Components