Study guide

9.2 Inherent Permissions, Inherent Entitlements & Security Scoping

Microsoft Dynamics 365 Business Central Developer MB-820

Track your progress as you read

Finished sections get a check mark.

1 Chapter 1: Business Central Architecture & Platform Foundation

1.1 Business Central Architecture & Extensions Model 1.2 Customization Lifecycle: Cloud (SaaS) vs. On-Premises 1.3 Base Application, System Application & AppSource

2 Chapter 2: Development Environment & Configuration

2.1: Development Environment Setup: VS Code, AL: Go! Projects & Sandboxes 2.2: AL Configuration Files: app.json & launch.json Parameters 2.3: Multi-Root Workspaces & Project Dependencies

3 Chapter 3: Extension Lifecycle: Debugging, Deployment, Multilanguage & Maintenance

3.1 Debugging & Snapshot Debugging in Visual Studio Code 3.2 Extension Deployment & Schema Synchronization Modes 3.3 Multilanguage Development with XLIFF & Translation Files 3.4 Extension Maintenance, Deprecation & Breaking Changes

4 Chapter 4: Tables, Table Extensions & Data Modeling

4.1: Building Tables, Fields, Keys & Data Types 4.2: Table Extensions & Table Modifications 4.3: FlowFields, FlowFilters & Table Relations 4.4: Enums, Enum Extensions & Extensible Types

5 Chapter 5: Pages, Page Extensions & Role Centers

5.1: Page Types, Anatomy & Control Structure 5.2: Building Card, List & Document Pages 5.3: Page Extensions & Page Customizations 5.4: Role Centers, Headlines & Cue Data Modeling

6 Chapter 6: Reports & Document Generation

6.1 Report Architecture, DataItems & Dataset Design 6.2 Report Layouts: RDLC, Word, Excel & Multilanguage 6.3 Document Reports & Request Page Programming 6.4 Processing-Only Reports & Report Substitutions

7 Chapter 7: XMLports & Data Exchange

7.1 XMLport Architecture, Formats & Properties 7.2 XMLport Node Hierarchy, Triggers & Stream Manipulation

8 Chapter 8: Codeunits, Events, Triggers & Interfaces

8.1 Codeunit Types, Execution & SingleInstance Codeunits 8.2 Events, Publishers, Subscribers & Event Isolation 8.3 Interfaces, Polymorphism & Dynamic Codeunit Invocation 8.4 Installation & Upgrade Codeunits, Data Transfer & Archive

9 Chapter 9: Entitlements, Permissions & Queries

9.1 Permission Sets & Permission Set Extensions 9.2 Inherent Permissions, Inherent Entitlements & Security Scoping 9.3 Query Objects: Joins, Aggregation & Query as Report Data Source

10 Chapter 10: UI Customization, User Assistance & Onboarding

10.1 Profile Objects & Custom Page Views in AL 10.2 User Assistance: ToolTips, Teaching Tips & In-App Tours 10.3 Assisted Setup, Guided Experience & Onboarding Checklists

11 Chapter 11: Business Central Design Patterns & Data Process Model

11.1 Functional Table Types: Master Data, Supplemental & Setup Patterns 11.2 Document Standards: Header, Line, History & Journal Architectures 11.3 Data Process Model & Posting Routine Architecture

12 Chapter 12: AL Language Fundamentals, Data Types & Variables

12.1 AL Syntax, Variable Scope, Primitive & Complex Data Types 12.2 Expressions, Control Flow Statements & Built-in Functions 12.3 Access Modifiers (Public, Internal, Local) & Code Scoping

13 Chapter 13: Data Manipulation, Streams & Error Handling

13.1 Record Operations: Get, FindSet, ModifyAll & Filter Functions 13.2 Streams, File Management & TempBlob 13.3 Error Handling: ErrorInfo, TryFunctions & Collectible Errors

14 Chapter 14: Testing, Test Toolkit & Automation

14.1 Testing Architecture & the Test Toolkit 14.2 Authoring Test Codeunits & UI Handler Functions

15 Chapter 15: Telemetry, Performance Optimization & Analyzers

15.1 Telemetry Configuration & Azure Application Insights 15.2 Custom Telemetry Signals with Session.LogMessage & KQL 15.3 Performance Profiler, SetLoadFields & Query Optimization 15.4 AL Analyzers: CodeCop, AppSourceCop, UICop & PTECop

16 Chapter 16: REST Web Services & JSON in AL

16.1 HttpClient, HttpRequestMessage & REST API Consumption 16.2 JSON Processing: JsonObject, JsonArray, JsonValue & JsonToken

17 Chapter 17: API Pages, OData, Read Scale-Out & OAuth

17.1 API Pages (PageType=API), OData Web Services & REST Endpoints 17.2 Bound and Unbound OData Actions with [ServiceEnabled] 17.3 Read Scale-Out Architecture & DataAccessIntent Configuration 17.4 Microsoft Entra ID App Registrations & OAuth 2.0 Integration

9.2 Inherent Permissions, Inherent Entitlements & Security Scoping

Key Takeaways Explain This Topic AI

The InherentPermissions attribute elevates object and TableData access rights for specific AL procedures or objects without requiring explicit user permission set assignments.

Inherent permissions encapsulate sensitive database operations directly within business logic, upholding the principle of least privilege and eliminating permission set bloat.

License entitlements define the hard operational ceiling dictated by Microsoft commercial subscription plans (Essential, Premium, Team Member), which user permissions can never exceed.

The InherentEntitlements attribute elevates license plan boundaries for specific procedures, enabling background operations (logging, setup caching) on behalf of restricted licenses.

AL entitlement objects map Microsoft Entra ID commercial license service plan GUIDs, directory roles, or application IDs to specific Business Central object permissions.

Last updated: August 2026

9.2 Inherent Permissions, Inherent Entitlements & Security Scoping

In modern Dynamics 365 Business Central development, managing security exclusively through external permission sets assigned to individual user accounts introduces severe administrative overhead, potential security vulnerabilities, and frequent licensing friction. When background routines, automated telemetry logging, preference caching, or ISV extensions require temporary access to restricted tables, granting broad permissions to all interactive end users violates the fundamental principle of least privilege.

To overcome these architectural constraints, AL introduces three powerful modern security constructs: the InherentPermissions attribute, the InherentEntitlements attribute, and first-class entitlement objects. For developers preparing for the MB-820 certification exam, mastering how these mechanisms interact with standard user permissions and Microsoft commercial licensing boundaries is critical for Domain 3.

1. The InherentPermissions Attribute Architecture

The [InherentPermissions] attribute allows an AL procedure or an entire object (Codeunit, Table, Page, Report, Query) to be granted elevated permissions to TableData or objects for the exact duration of that procedure's execution, regardless of whether the running user has those permissions assigned in their permission sets .

Procedure-Level vs. Object-Level Inherent Permissions

Inherent permissions can be declared at either the object level (in the object header) or the procedure level (as an attribute): codeunit 50105 "Loyalty Processing Engine"

  • {
  • // Object-level inherent permissions: grants read access across all procedures in this codeunit
  • InherentPermissions = tabledata "Loyalty Member" = r;

// Procedure-level inherent permission: grants temporary elevated CRUD rights

[InherentPermissions(PermissionObjectType::TableData, Database::"Loyalty Ledger Entry", 'rimd', InherentPermissionsScope::Both)]

  • procedure RecordTransactionPoints(MemberNo: Code[20]; PointsToAdd: Decimal)
  • var
  • LoyaltyLedgerEntry: Record "Loyalty Ledger Entry";
  • begin
  • LoyaltyLedgerEntry.Init();
  • LoyaltyLedgerEntry."Entry No." := 0;
  • LoyaltyLedgerEntry."Member No." := MemberNo;
  • LoyaltyLedgerEntry."Points Added" := PointsToAdd;
  • LoyaltyLedgerEntry."Posting Date" := Today();
  • LoyaltyLedgerEntry.Insert(true);
  • end;

[InherentPermissions(PermissionObjectType::TableData, Database::"Audit Log Entry", 'i', InherentPermissionsScope::Cloud)]

  • local procedure WriteAuditTrace(TraceMessage: Text[250])
  • var
  • AuditLog: Record "Audit Log Entry";
  • begin
  • AuditLog.Init();
  • AuditLog."Log ID" := CreateGuid();
  • AuditLog."Message" := TraceMessage;
  • AuditLog."Timestamp" := CurrentDateTime();
  • AuditLog.Insert(true);
  • end;
  • }
  • Attribute Parameters Breakdown

Parameter Type Options / Syntax Description & Runtime Behavior

PermissionObjectType Enum PermissionObjectType::TableData , Table , Page , Codeunit , Report , XMLport , Query Specifies the target object category being authorized. Most commonly TableData .

TargetObjectId Integer / Reference Database::"Table Name" , Codeunit::"Codeunit Name" , Page::"Page Name" The strongly-typed numerical identifier or database reference of the target object.

Permissions String Literal 'r' , 'i' , 'm' , 'd' , 'rimd' , 'X' The exact CRUD flags or execution rights granted to the procedure.

Scope Enum InherentPermissionsScope::Both , Cloud , OnPrem Defines the deployment target where inherent permissions apply. Both applies universally across cloud SaaS and on-premises environments.

Architectural Comparison: Inherent Permissions vs. Object Header Permissions

Architectural Dimension Object Header Permissions Property [InherentPermissions] Attribute

User Prerequisite User MUST possess Indirect permissions ( r , i , m , d ) in an assigned permission set. User needs NO assigned permissions whatsoever for the target table.

Granularity Applies to the entire object (all procedures in the codeunit/report). Can be targeted to a single specific procedure or applied object-wide.

Scoping Active universally across all platforms. Can be scoped to Both , Cloud , or OnPrem .

Primary Use Case Core business posting routines (e.g., G/L posting where indirect rights are modeled in RBAC). Background logging, telemetry, setup caching, sequence counter increments, and internal data structures.

Why Use InherentPermissions ?

Enforces Least Privilege : Users do not need direct or indirect table access assigned to their user accounts just because a routine logs an event or reads an internal cache.

Encapsulates Database Access : Direct table manipulation from outside the procedure is impossible; modifications can only occur when routed through the validated business logic of that procedure.

Eliminates Permission Bloat : Administrators no longer need to manage sprawling permission sets containing hundreds of internal setup and log tables.

Loading diagram... Runtime Access Evaluation: Permissions vs. Entitlements vs. Inherent Elevation

2. Permissions vs. Entitlements & InherentEntitlements

Understanding the fundamental distinction between User Permissions and License Entitlements is critical for enterprise AL development and is heavily emphasized on the MB-820 certification exam:

User Permissions : Configured by the tenant system administrator in the Business Central Web Client. They dictate what a specific user is authorized to do within their business organization based on assigned roles.

License Entitlements : Dictated by the customer's Microsoft commercial subscription plan (such as Dynamics 365 Business Central Essential , Premium , Team Member , Device , or External Accountant ). Entitlements define the maximum legal and technical capabilities permitted by Microsoft licensing.

The Cardinal Licensing Rule: A user's effective permissions can never exceed their license entitlements. Even if an administrator assigns the SUPER permission set to a user with a Team Member license, the runtime engine restricts that user from posting general journals, modifying warehouse shipments, or altering core master data because the Team Member entitlement strictly limits write operations.

The InherentEntitlements Attribute

When an extension needs to perform background operations—such as writing an application telemetry entry, reading extension configuration settings, caching user UI filter preferences, or updating a shared license counter—on behalf of a user who holds a restrictive license (such as a Team Member or Device license), standard permissions and even [InherentPermissions] fail if the operation violates the user's license entitlement ceiling.

The [InherentEntitlements] attribute elevates the license entitlement boundary for that specific procedure or object, allowing authorized background code to execute on behalf of any licensed user. codeunit 50106 "User Preference Sync"

{

[InherentEntitlements(PermissionObjectType::TableData, Database::"Extension User Setup", 'rimd', InherentEntitlementsScope::Both)]

  • procedure SaveUserTheme(ThemeCode: Code[20])
  • var
  • UserSetup: Record "Extension User Setup";
  • begin
  • if not UserSetup.Get(UserSecurityId()) then begin
  • UserSetup.Init();
  • UserSetup."User Security ID" := UserSecurityId();
  • UserSetup."Selected Theme" := ThemeCode;
  • UserSetup.Insert(true);
  • end else begin
  • UserSetup."Selected Theme" := ThemeCode;
  • UserSetup.Modify(true);
  • end;
  • end;
  • }
  • Inherent Entitlements Scoping

Like inherent permissions, [InherentEntitlements] supports scoping via InherentEntitlementsScope :

InherentEntitlementsScope::Both : Active across both Business Central SaaS (cloud) and On-Premises environments.

InherentEntitlementsScope::Cloud : Active strictly in Business Central Online (SaaS) environments.

InherentEntitlementsScope::OnPrem : Active strictly in on-premises server deployments.

Scoping Matrix & Best Practices

Attribute Solves Problem With Typical Target Recommended Scope

[InherentPermissions] Missing user permission sets Audit tables, error logs, transaction counters InherentPermissionsScope::Both

[InherentEntitlements] Commercial license plan restrictions (Team Member write caps) User preferences, extension setup tables, feature usage telemetry InherentEntitlementsScope::Both

3. AL Entitlement Objects ( entitlement )

An entitlement object in AL defines the mapping between a Microsoft Entra ID (Azure AD) commercial license plan, directory role, or application identifier and specific Business Central objects or permission sets. Entitlements are primarily authored by AppSource ISVs and specialized enterprise developers to enforce tier-based licensing models. entitlement 50100 "Loyalty App Essential Plan"

  • {
  • Type = Plan;
  • Id = '9638a72e-333e-4cf3-ad1a-cd43a75877f0'; // Dynamics 365 Business Central Essential Service Plan GUID
  • ObjectEntitlements =
  • tabledata "Loyalty Member" = RIMD,
  • table "Loyalty Member" = X,
  • page "Loyalty Member Card" = X,
  • codeunit "Loyalty Processing Engine" = X;
  • IncludedPermissionSets = "Loyalty Manager";
  • }
  • Key Properties of Entitlement Objects

Property Description & Supported Options

Type Specifies the identity classification:; • Plan : Maps to an Entra ID Service Plan GUID associated with a commercial Microsoft 365 / Dynamics 365 subscription (e.g., Essential, Premium, Team Member, or custom ISV offer).; • Role : Maps to an Entra ID directory role ID (such as Global Administrator or Helpdesk Administrator).; • Application : Maps to an Entra ID registered application ID used for Service-to-Service (S2S) API authentication.

Id The specific GUID or identifier string representing the Entra ID service plan, directory role, or application client ID.

ObjectEntitlements A direct comma-delimited list of object access rights granted to users possessing that specific license plan.

IncludedPermissionSets References existing AL permission sets granted as part of the entitlement package.

4. Comprehensive Security Evaluation Hierarchy

When an AL procedure attempts to read or modify a database record at runtime, the Business Central Navision Server Tier (NST) executes a deterministic evaluation pipeline: 1. Check Base Entitlement Ceiling:

Is the requested operation permitted by the user's Entra ID License Plan (Essential, Team Member)?

├── YES ──> Proceed to Step 2.

└── NO ──> Is the executing procedure decorated with [InherentEntitlements]?

├── YES ──> Elevate Entitlement Ceiling and Proceed to Step 2.

└── NO ──> THROW LICENSE ENTITLEMENT ERROR (Blocked by License).

2. Check User Assigned Permissions:

Does the user have assigned Permission Sets (or Security Groups) granting direct or indirect rights?

├── DIRECT (RIMD) ──> OPERATION PERMITTED.

├── INDIRECT (rimd) ──> Does the executing object declare Permissions in its header?

│ ├── YES ──> OPERATION PERMITTED (Elevated by Object).

│ └── NO ──> THROW PERMISSION ERROR (Requires Object Elevation).

└── NONE ──> Is the executing procedure decorated with [InherentPermissions]?

├── YES ──> OPERATION PERMITTED (Elevated by InherentPermissions).

└── NO ──> THROW PERMISSION ERROR (Access Denied).