About this article: This article is reviewed against the cited sources. This is source research, not lab validation. Check the stated versions and your own requirements before making changes.
When Dynamics 365 or Dataverse reports error 0x80040220 (PrivilegeDenied), the message says a principal is missing a privilege on a table. The user, or team, named in the message has no security role that grants that privilege on that table. Microsoft's own advice in the message is to consider "adding missing privilege to one of the principal (user/team) roles for the request to succeed". Take the Id and the table from the message, look at the roles that user holds in the Power Platform admin center, and change either the assignment or the role's privilege.
What the error means
Microsoft's error code list gives this template for error code 0x80040220 (-2147220960), named PrivilegeDenied:
{5} {2}(Id = {3}) is missing {0} privilege on {1} entity(OTC={4}). Consider adding missing privilege to one of the principal (user/team) roles for the request to succeed.
Our own reading of the placeholders: {5} is the kind of principal (a user or a team), {2} its name, {3} its Id, {0} the missing privilege, {1} the table and {4} the table's object type code. A related code, 0x80040299 (TargetPrincipalLacksReadPrivilege), has the same shape and points to a Microsoft document.
Dataverse access works through security roles. Microsoft says "Security role privileges are cumulative": a user is granted the privileges available in each role assigned to them. Table privileges are Create, Read, Write, Delete, Append, Append to, Assign and Share, and each has an access level (Organization, Parent: Child Business Unit, Business Unit, User or None). A user gets in only with at least one role: "The service doesn't allow access to users who don't have at least one security role."
Our own reading: the message is a privilege-level answer. None of the principal's roles holds the named privilege on that table.
Likely causes
| Cause | What you see | How to confirm |
|---|---|---|
| The user has no role, or only a role without this table | Several tables fail, or the user cannot open apps | Manage security roles on the user shows no role, or roles unrelated to the table |
| The role's Read for the table is None | The user holds a role that looks right | The Tables tab of the role shows no Read access for the table |
| The role was copied from another and is out of date | A new table or feature fails only for this role | Microsoft says a copied role "could become out-of-date"; compare with the source role |
| The role is held through a group team | Diagnostics and the role list disagree | Microsoft says the diagnostics check only roles assigned directly, not roles inherited through group teams |
| A licence or group membership changed recently | The role looks right but access is still refused | Microsoft says that after assigning a license or updating group membership you wait for the change to sync to the environment |
| The named principal is a team or another user | The Id is not the signed-in person | The Id in the message does not match the user's own record |
Prove the cause before changing anything
These steps only read.
- Copy the whole message. Write down the principal's Id, the privilege, the table, and the time it happened.
- In the Power Platform admin center, select Manage, then Environments, then the environment. Select Settings, then Users + permissions, then Users. Open the user whose Id matches. If the message names a team, open the team instead.
- Select Manage security roles, and write down which roles are ticked.
- Under Users + permissions, select Security roles, open each role from step 3, and on the Tables tab search for the table. Read whether Read is set and at what level.
- If the user gets a role through a group team, check the team's roles separately, because the diagnostics look only at directly assigned roles.
Run diagnostics is a separate step and is optional, because it changes the user's record in the environment.
Risk: Microsoft says that when you run or rerun diagnostics, "the process synchronizes the user information in Microsoft Entra ID to the environment's Dataverse database". That refreshes this user's record in the environment, and the refresh cannot be undone, although it only brings the record up to date.
Select Run diagnostics for the user and read the details. Microsoft says it gives details and mitigation suggestions about why a user can or can't access the environment.
Fix
Fix the smallest thing that explains step 4. Role privileges are cumulative, so adding a role grants everything in it.
Assign the user a role that already grants Read
First save the current state: write down the roles currently ticked for the user in Manage security roles, and the time.
Risk: Assigning a role gives the user every privilege in it, which may reach well beyond the one table. Microsoft says the person assigning cannot assign a role with more privileges than their own, so the step may need a System Administrator.
In the environment, select Settings, Users + permissions, Users, select the user, then Manage security roles. Tick the role and select Save. Microsoft says that after saving, all selected roles become the current assigned roles, and unselected roles aren't assigned.
Only if you need to back out, return the user to the roles you wrote down.
Risk: Unticking the role you added takes away the access that role gave, and the user's action fails again.
Open Manage security roles again, tick exactly the roles you wrote down, untick the one you added, and select Save.
Add Read for the table to a custom role
Microsoft says you can't edit the System Administrator security role, so copy it and change the copy, and you can't edit the settings of system security roles. Edit a custom role, or a copy.
Write down the current Read setting for the table on that role and the time.
Risk: Editing a security role changes the access of every user and team that holds it, not only the person with the error. A wider Read level lets all of them see more records.
Select Settings, Users + permissions, Security roles, choose the role, find the table on the Tables tab, set Read, and select Save + close. Choose the narrowest access level that fits the work, as Microsoft's table of levels shows: User covers records the user owns or that are shared with them, Business Unit covers the business unit, and Organization covers everything.
Only if you need to back out, restore the Read setting you wrote down.
Risk: Restoring the value removes the access your change gave to everyone who holds the role, and their action fails again.
Open the same role, set Read for the table back to the value you wrote down, then select Save + close.
Stale copies, group teams and refresh
When the cause is an out-of-date copy, Microsoft says "Security role privileges are subject to change with updates and the copied security role could become out-of-date" and that you should periodically check security role privileges. Do not edit the system role. When the role comes through a group team, change the team's roles by Microsoft's group team steps. After a licence is assigned or group membership is updated, Microsoft says to wait for the change to sync to the environment, and that the environment's system administrator can trigger a sync by re-adding the user. These are described because the exact action depends on how your teams are built. Microsoft also says you can export your changes to a security role as a solution to make a backup.
Example (illustrative): at Example Pty Ltd, user1@example.com opens a model-driven app and gets the message for 0x80040220 naming their own Id, the Account table and a missing Read privilege. Manage security roles shows one role, Example Field Sales. Its Tables tab shows Account with no Read access. The administrator writes down that Read for Account is none, sets it to Business Unit, and selects Save + close. The Account list now opens for user1@example.com, but only for records in their business unit.
Confirm the fix
- Repeat the exact action that failed, as the same user. The message does not appear.
- Open the user in Users, select Run diagnostics again and read the details.
- Open the role on the Tables tab and check Read for the table shows the value you set.
- Ask one other user with the same role to do their usual work, since a role change reaches them too.
What to watch afterwards
- Give each job a role with a clear name, and use Microsoft's description fields (Applies to and a summary of core tables) so that the role's purpose is on its face.
- Compare copied roles with their source after Microsoft changes the source, because privileges are subject to change with updates.
- Keep a record of who may assign roles. Microsoft's rule that an assigner cannot grant more than they hold protects against privilege creep.
- For the matching Business Central problem, see Business Central "You don't have the following permissions on TableData": find the missing permission and fix the permission set.
Read next
Related articles you may want next.
- TroubleshootingBusiness Central "You don't have the following permissions on TableData": find the missing permission and fix the permission setBusiness Central "You don't have the following permissions on TableData": check Effective Permissions, then fix the permission set or assignment.Read article
- TroubleshootingMicrosoft Graph PowerShell "Authorization_RequestDenied. Insufficient privileges to complete the operation."Microsoft Graph PowerShell returns Authorization_RequestDenied. Compare Get-MgContext scopes with Find-MgGraphCommand, then add the missing scope.Read article
- TroubleshootingBusiness Central "Posting date is not within your range of allowed posting dates": find the range that blocks the datePosting date is not within your range of allowed posting dates in Business Central: check User Setup, General Ledger Setup and journal templates in order.Read article
Risks and limits
- These commands have not been run or lab-tested.
- The message wording in a given environment may differ from Microsoft's template.
- Role edits reach everyone who holds the role. Record who approved the change.
Sources
- Web service error codes — Microsoft Learn, page dated 21 July 2025, accessed 4 December 2026
- Security roles and privileges for Dataverse — Microsoft Learn, page dated 9 December 2025, accessed 4 December 2026
- Assign a security role to a user — Microsoft Learn, page dated 16 December 2025, accessed 4 December 2026
- Create or edit a security role to manage access — Microsoft Learn, page dated 9 December 2025, accessed 4 December 2026
- Save time creating a security role by copying one — Microsoft Learn, page dated 9 December 2025, accessed 4 December 2026
- Troubleshoot user access problems for different environments — Microsoft Learn, page dated 31 March 2026, accessed 4 December 2026
This article was originally published on .