Giving an AI agent the keys to Business Central: practical security tips.
Securing AI agents that act on data in Business Central requires deliberate choices about identity, permissions, validation and oversight. The post provides a framework for deploying agents safely using existing tools like MFA, least privilege and change control, ensuring accountability stays with people rather than the agent.

post Stefano Demiliani
"The agent can do the work, but accountability stays with people."
Key points
- AI agents need their own application identity with narrow permissions built from the task backwards, not shared logins or broad service accounts
- Treat all data the agent reads (PDFs, emails, fields) as untrusted input vulnerable to prompt injection and validate it with deterministic code before acting
- Require human approval with full evidence (source documents, matched orders, rule violations, agent identity) and enforce posting rights so only humans can finalize records
- Plan for failure before go-live: rehearse disabling the agent, audit trails to trace what it did, and point-in-time restore capability to repair damage
- AI-generated code in development must follow normal engineering gates (branch policies, analyzers, human review) and avoid closed-loop approval by multiple AI systems
Quotes
- “The agent can do the work, but accountability stays with people.” (Summarizes the core principle: agents execute but humans remain responsible, preventing delegation of accountability)
- “Permitted, plausible and wrong is the failure mode to design against.” (Highlights that technical permissions alone cannot prevent incorrect decisions; additional controls and human judgment are required)
- “These checks are boring, testable and impossible to sweet-talk, which is exactly what you want from a control.” (Emphasizes that deterministic validation rules are more reliable than trusting the agent’s judgment to follow instructions)
AL objects mentioned
As named in the post. A name that matches one object page by exact type and name links to it; the others stay as named.
- page 9852 “Effective Permissions”
- page “Microsoft Entra Applications”
Not found in BC28-30: page “Microsoft Entra Applications”.
Possibly related
No source states these links: they share an object, a model read them, or a person found the same subject.
- Define granular permissions — possibly related: names Page 9852 “Effective Permissions”
- Licensing in Business Central — possibly related: names Page 9852 “Effective Permissions”
Context
- Features: AI agents and copilots, Permission sets and role-based access control, Application identities and service principals, Audit logs and change tracking, Multi-factor authentication, Point-in-time restore, Application Insights telemetry, Approval workflows
Source: Stefano Demiliani, community blog. Summary, key points and quotes are derived (CONTENT-NOTICE.md); read the original for the full text.