When attempting to install a solution in Dynamics 365, you see the following message:
"The import of solution: [Solution Name] failed.
Error code 80040220"
The detail section shows the following message:
"You do not have permission to access these records. Contact your Microsoft Dynamics 365 administrator."
When attempting to delete a solution, you see the following message:
You do not have permission to access these records..."
This error occurs if you are missing the necessary privileges to install or delete the solution. This issue may also occur if you do not have a license assigned.
Access Dynamics 365 as a user with the System Administrator or System Customizer security role to successfully remove the solution. Also verify you have a license assigned.
If you need to remove the solution using a custom security role, use the Download Log File button within the error to see details about which privilege is missing. The log file will contain error details such as the following:
"Principal user (Id=2fff663e-a75a-e811-a986-000d3a3672b5, type=8) is missing prvCreateWebResource privilege (Id=bd57cfa5-8495-4b3e-b358-da246ba797b5)"
The example message above indicates the user is missing the Create privilege for the Web Resource entity. For additional information about how to edit a security role, see Edit a security role
NOTE: If a System Administrator grants access to the missing privilege and import continues to fail with this error, continue reviewing the error log to see which other privilege(s) is missing.