Error 0x80040216: Permission Denied

Error Message: "The user does not have sufficient permissions".
What it means: The integration user lacks the necessary permissions to perform the requested operation in Dynamics 365.

ScenarioError ExampleCauseQuick Fix
Missing CRUD PrivilegePrincipal user is missing prvCreateAccount privilegeUser doesn't have Create permission on Account entityAssign security role with Create privilege at appropriate depth
Insufficient Privilege DepthMissing prvReadContact privilege (Required Depth=Global)User has Read but only at User/BU level, not Organization levelChange privilege depth to Organization in security role
Field-Level SecurityUser does not have read permissions to a SSN secured fieldField has FLS enabled, user lacks field security profileAssign field security profile to user
Business Unit AccessUser does not have access to specified Business UnitUser cannot access records in different BUMove user to root BU or increase role depth to Organization
Application User Not ConfiguredUser does not have sufficient permissions (Application User)Application user created but no security role assignedAssign security role to application user
How to Fix

Step 1: Identify What's Missing

Check the error message for:

  • Which privilege: prvCreate, prvRead, prvWrite, prvDelete, prvAppend, prvAssign.
  • Which entity: Account, Contact, custom entity.
  • SystemUserId: User GUID from error message.
  • Required depth: User, Business Unit, or Organization.
Step 2: Assign Security Role

In Dynamics 365:

  • Settings > Security > Users.
  • Find user by SystemUserId from error.
  • Click "Manage Roles".
  • Assign appropriate role OR create custom role.
Recommended Integration Role Privileges:

  • Entity: Account, Contact, Lead, Opportunity, Quote, Order, Product.
  • Privileges: Create, Read, Write, Delete, Append, AppendTo, Assign.
  • Depth: Organization (for all records across all BUs).
Step 3: Fix Field-Level Security (If Needed)

  • Settings > Security > Field Security Profiles.
  • Create "Rapidi Integration Profile".
  • Add secured fields with Read, Update, Create permissions.
  • Assign profile to integration user.
Step 4: Fix Business Unit Access (If Needed)

Option A: Move user to root business unit.

Option B: Change role privilege depth from "Business Unit" to "Organization".