Skip incoming message review only after the caller validated the payload
Incoming task messages default to requiring user approval before the agent runs. From 28.1, Agent Task Message Builder.SetRequiresReview(false) starts the agent immediately. That is safe only for inputs you already validated in AL (your page action, your posting subscriber).
- communitylayer
- agentsdomain
- 2examples
- 2pull requests
Rule on GitHub · community layer · agents · BC 28.. · tier official · derived
Description
Incoming task messages default to requiring user approval before the agent runs. From 28.1, Agent Task Message Builder.SetRequiresReview(false) starts the agent immediately. That is safe only for inputs you already validated in AL (your page action, your posting subscriber). External email or partner payloads are not trusted by default. Analysis Warnings still force a review.
Best Practice
Leave the default review-on for anything that originated outside your extension. Call SetRequiresReview(false) only on messages you constructed from already-authorized BC data.
See sample: skip-incoming-review-only-for-trusted-input.good.al.
Anti Pattern
SetRequiresReview(false) on simulated email, incoming webhooks, or user-free text. Detection signal: SetRequiresReview(false) next to external content with no prior validation.
See sample: skip-incoming-review-only-for-trusted-input.bad.al.
Examples
- Good: skip-incoming-review-only-for-trusted-input.good.al
- Bad: skip-incoming-review-only-for-trusted-input.bad.al
Changed by
- #174 Make BCQuality documentation easier for partners to get started, 2026-09-09
- #137 Add community guidance and review support for Business Central agents, 2026-09-02
From microsoft/BCQuality at a4593a1, MIT License, Copyright (c) 2026 Microsoft Corporation (license).