topic hubAL Developmentofficial - Microsoftreviewed - checked by Opus

Handling security

Security handling in AL development 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 authentication, authorization, and protecting credentials and secrets in extensions.

Path: Development > Programming in the AL language > Handling security · tier official · system development · narrative reviewed (checked by Opus)

Overview

This section covers how AL developers secure Business Central apps. It starts with a general guidance page on security best practices: a security development lifecycle, a layered security model, user session and web service authentication, auditing, encryption, entitlements, and permission sets.

Two subtopics go deeper. The permission sets and entitlements subtopic (14 pages) covers defining and extending permission set and entitlement objects, object permissions, inherent permissions, XML export, upgrading from legacy permissions, and permission telemetry. The Azure Key Vault subtopic (5 pages) covers setting up app key vaults for online and on-premises deployments, retrieving secrets in AL, and monitoring secret access with telemetry.

Two own pages cover storing and handling sensitive values in code: Isolated Storage keeps keys and values private to an extension, and the SecretText data type stops credentials from being exposed during debugging. Start with the security overview, then go to the subtopic or page that matches your task.

Key points

  • The overview page covers authentication, authorization, auditing, encryption, and secrets management for AL developers.
  • Permission sets and entitlements are defined as AL objects; permission sets can be composed and extended, and permissions can be exported to XML.
  • Guidance includes setting object permissions, inherent permissions, and upgrading from legacy permissions.
  • Permission telemetry can be analyzed to understand permission use.
  • App key vaults can be set up for both online and on-premises deployments, and secrets are retrieved in AL code.
  • Secret access from Key Vault can be monitored with telemetry.
  • Isolated Storage offers extension-isolated storage with Set, Get, Contains, Delete, and SetEncrypted methods and a DataScope option type.
  • SecretText prevents credential exposure during debugging by restricting assignments to debuggable types, and supports secure operations through HttpClient and SecretStrSubstNo; related features include the Unwrap method and the NonDebuggable attribute.

Subtopics

More Learn pages

Videos, posts and code changes

Linked by a Haiku matcher with a grounding quote from the item’s summary (link/topics.ts); machine-generated.

Source: Microsoft Learn (CC BY 4.0). Descriptions are Learn’s own.

What Learn documents here 8 of 22 Learn pages

Show 14 more