Handling security
Security handling in AL for Business Central: security best practices, permission sets and entitlements, Azure Key Vault for app secrets, Isolated Storage, and the SecretText data type. It answers questions on access control, secrets management, and protecting credentials in extensions.
- 22Learn pages
- 2subtopics
- 1videos
Path: Development > Programming in the AL language > Handling security · tier official · system development · narrative unreviewed (model text not yet checked)
Overview
This section covers how AL developers secure Business Central apps. It starts with a general guide on security best practices, which describes a layered security model and covers authentication, authorization, auditing, encryption, and secrets management.
The rest of the pages go deeper on two areas. Access control is covered by the permission sets and entitlements subtopic, which explains how to define and compose permission objects. Secrets handling is covered by Azure Key Vault for app secrets, Isolated Storage, and the SecretText data type. These protect values such as credentials in storage, at retrieval, and during debugging.
Start with the security overview for the big picture. Then go to permission sets and entitlements for authorization work, or to Key Vault, Isolated Storage, and SecretText when your extension handles secrets.
Key points
- The security overview for AL developers covers the security development lifecycle, a layered security model, user session and web service authentication, entitlements, and permission sets.
- Permission sets and entitlements are defined as AL objects. They can be composed and extended, given object permissions and inherent permissions, exported to XML, and upgraded to AL-based permissions.
- Permission telemetry can be monitored to troubleshoot access control.
- Azure Key Vault for app secrets can be set up for both online and on-premises. Secrets are read from AL code, and the setup involves app.json and permissions.
- Key retrieval from Azure Key Vault can be monitored with telemetry.
- Isolated Storage keeps keys and values private to an extension. It offers the Set, Get, Contains, Delete, and SetEncrypted methods and uses the DataScope option type.
- The SecretText data type prevents credentials from being exposed while debugging in AL. It restricts assignments to debuggable types.
- SecretText works with HttpClient and SecretStrSubstNo, and the Unwrap method and NonDebuggable attribute are part of the topic.
Subtopics
- Permission sets and entitlements overview (14 pages)
- Using Azure Key Vault for app secrets (5 pages)
More Learn pages
- Business Central security for AL developers: Understand and improve the security of your Business Central apps written in AL.
- Isolated Storage: Isolated Storage is a data storage that provides isolation between extensions, so that you can keep keys/values in one extension from being accessed from other extensions.
- Protecting sensitive values with the SecretText data type: The SecretText data type is designed to protect sensitive values from being exposed when debugging.
Videos, posts and code changes
Linked by a Haiku matcher with a grounding quote from the item’s summary (link/topics.ts); machine-generated.
- #10382 [Expense Agent] Fix administrative recall history access (code change): “Only the captured submitter or a user with Unlimited Expense Approval can recall”
- #10492 [SOA] Restrict direct deletion of contact overrides (code change): “Inherent delete permission removed from table to prevent unauthorized direct deletion”
- #11996 Restrict expense configuration maintenance to admins (code change): “Restrict configuration maintenance for expense management to administrators”
- #12140 [Email - SMTP Connector] Fix OAuth Base64URL token parsing (code change): “Base64URL tokens are converted to standard Base64 format before decoding”
- #9360 Harden SFTP Client module (security review phase 1) (code change): “MD5 host-key fingerprints are no longer supported; only SHA256 prefixes accepted”
- #9717 Fix internal admin losing SUPER during customized plan provisioning (code change): “Internal tenant administrators no longer lose SUPER permission set when their customized plan”
- #9838 Grant indirect read on Privacy Notice tables in Privacy Notice Impl. (code change): “The Privacy Notice Impl. codeunit now grants indirect read permission on Privacy Notice”
- #102 Privacy DataClassification fixes + keep Label-scope findings at minor (code change): “Fixed factual errors in the privacy data-classification article”
- #131 Correct table-level data classification guidance (code change): “Privacy guidance now states that a valid table-level DataClassification is inherited by fields”
- #92 Correct security and privacy knowledge guidance (code change): “Security and privacy knowledge articles were corrected to align with current Business Central APIs”
- Securing Sensitive Data in Business Central AL using SecretText (community post): “SecretText is a data type in Business Central AL that protects sensitive values”
- Step-by-Step Guide to Secure Business Central Agent Implementations in AL (community post): “permission sets. Agents still need testing to check they cannot be tricked”
- Dynamics 365 Business Central: locking down IsolatedStorage reads. (community post): “protecting sensitive data like secret keys, feature flags, and cached tokens”
- BC Friday Tips #37 Inherent Permissions (community post): “Inherent Permissions in AL allow developers to grant temporary access”
- Dynamics 365 Business Central: Do users really need permissions for Temporary Tables? (Permissions and temporary tables) (community post): “Setting SourceTableTemporary property to true on a page”
- Business Central 2025 wave 1 (BC26.1): New method to add SecretText values to JSON objects – WriteWithSecretsTo (community post): “WriteWithSecretsTo is a new method on the JsonObject type that adds SecretText values”
- Dynamics 365 Business Central: How to quickly check whether the user has write (Insert, Delete, and Modify) permission for the table in AL (community post): “use the Record.WritePermission() method in AL to check whether a user has write permissions”
- What’s New: Server and Database - A Faster Runtime (2023 release wave 2) (video): “Error Info Permission Checking; Permissions Work with Security Groups”
Source: Microsoft Learn (CC BY 4.0). Descriptions are Learn’s own.
What Learn documents here 8 of 22 Learn pages
- learn(automation API) Get permissionSet2024-05-31
- learnAnalyzing App Key Vault Secret Trace Telemetry2026-11-17
- learnAnalyzing Permission Changes Trace Telemetry2026-11-17
- learnAnalyzing Permission Dependency Cycle Trace Telemetry2026-11-17
- learnAnalyzing Permission Error Trace Telemetry2026-11-17
- learnAzure Key Vaults with Business Central2026-10-08
- learnBusiness Central security for AL developers2025-05-19
- learnComposing Permission Sets from Other Permission Sets2026-11-30
Show 14 more
- learnEntitlement object2025-03-19
- learnEntitlements and permission sets overview2024-11-18
- learnExport Permission Sets to XML Files2026-11-30
- learnInherent Permissions2023-02-27
- learnIsolated Storage2024-06-14
- learnPermission Set Extension Object2026-11-30
- learnPermission set object2025-06-02
- learnPermissions on Objects2025-06-02
- learnpermissionSet resource type2024-05-31
- learnProtecting sensitive values with the SecretText data type2025-01-30
- learnSet up app key vaults for Business Central online2026-01-27
- learnSetting up App Key Vaults for Business Central on-premises2021-04-01
- learnUpgrading Permission Sets and Permissions2026-01-08
- learnUse Key Vault Secrets in Business Central Extensions2026-10-09