{"title":"Agent permissions (preview)","url":"https://jonas-paprotka.de/docs/dev-itpro/ai/ai-development-toolkit-permissions/","by":"JOP-AL","license":"Copyright (c) Microsoft Corporation. CC BY 4.0, https://creativecommons.org/licenses/by/4.0/; code samples MIT. From https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/ai/ai-development-toolkit-permissions, MicrosoftDocs/dynamics365smb-devitpro-pb at 828b6ee (2026-11-19). Changed: includes filled in, links to this site, and for agents shortened without dropping a fact.","credit":"Microsoft Corporation, CC BY 4.0","origin":"https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/ai/ai-development-toolkit-permissions","source":{"name":"Business Central developer and IT pro docs","repo":"https://github.com/MicrosoftDocs/dynamics365smb-devitpro-pb","commit":"828b6ee72fcd75755627cd6011f3d20899217ab2","date":"2026-11-19"},"checked":"2026-11-19","description":"Learn about permissions and access control for AI agents in Dynamics 365 Business Central.","date":"2026-10-02","meta":{"topic":"concept-article"},"outline":[{"level":1,"title":"Agent permissions (preview)","slug":"agent-permissions-preview","at":0,"chars":8661},{"level":2,"title":"Access controls - effective permissions of an agent","slug":"access-controls---effective-permissions-of-an-agent","at":1134,"chars":1054},{"level":3,"title":"Example - permission intersection","slug":"example---permission-intersection","at":1650,"chars":538},{"level":2,"title":"Per-company access controls","slug":"per-company-access-controls","at":2188,"chars":1461},{"level":3,"title":"Configuring access controls via code","slug":"configuring-access-controls-via-code","at":2904,"chars":745},{"level":2,"title":"Agent access controls - who can see and edit the agent","slug":"agent-access-controls---who-can-see-and-edit-the-agent","at":3649,"chars":818},{"level":2,"title":"Agent administrators","slug":"agent-administrators","at":4467,"chars":877},{"level":3,"title":"Agent administration permission sets","slug":"agent-administration-permission-sets","at":4769,"chars":401},{"level":3,"title":"Related permission sets","slug":"related-permission-sets","at":5170,"chars":174},{"level":2,"title":"Extension agent creation permissions","slug":"extension-agent-creation-permissions","at":5344,"chars":2384},{"level":3,"title":"D365 Agent permission set","slug":"d365-agent-permission-set","at":5651,"chars":705},{"level":3,"title":"Agent Configuration Rights","slug":"agent-configuration-rights","at":6356,"chars":465},{"level":3,"title":"Configuring agent permissions across companies","slug":"configuring-agent-permissions-across-companies","at":6821,"chars":907},{"level":4,"title":"Example - configuring agent permissions across companies","slug":"example---configuring-agent-permissions-across-companies","at":7103,"chars":625},{"level":2,"title":"Related information","slug":"related-information","at":7728,"chars":933}],"text":"# Agent permissions (preview)\n[This article is prerelease documentation and is subject to change.]\n> IMPORTANT\n > This is a preview feature. Preview features might have restricted functionality and are subject to supplemental terms of use<https://www.microsoft.com/en-us/business-applications/legal/supp-powerplatform-preview/>.\n > The AI development toolkit is available in sandbox environments only. The Agent SDK for AL is available in sandbox environments and, starting from version 28.1, also in production environments.\n > This article is primarily intended for product owners, domain experts, consultants, and developers who want to experiment with AI capabilities in Business Central.\nTwo kinds of permission controls govern agents in Business Central.\n The access controls - Since agents are modeled as users in the system, they're assigned permissions via permission sets to govern what data, pages, and objects they can access. These are called the access controls of the agent.\n The agent access controls - This refers to the system that controls, which human users have the ability to edit the configuration of an agent.\n## Access controls - effective permissions of an agent\nWhen a user schedules a task for an agent, the task is run with permissions from the intersection of the user's permissions and the agent's permissions. This design ensures agents never exceed the privileges of the user who scheduled the task.\n> NOTE\n> If the agent makes a user intervention request, the task continues proceeding with the permissions of the user that responded to that intervention request. This user might be different from the task creator.\n### Example - permission intersection\nPermission|User|Agent|Effective Permissions\nRead Customers|Yes|Yes|Yes\nModify Customers|Yes|Yes|Yes\nDelete Customers|Yes|No|No\nPost Sales Orders|Yes|No|No\nRead Items|No|Yes|No\nThis means that in this example:\n The agent can read and modify customers (both user and agent have these permissions)\n The agent can't delete customers or post sales orders (agent lacks these permissions, even though the user has them)\n The agent can't read items (user lacks this permission, even though the agent has it)\n## Per-company access controls\nIt's possible to assign permissions to an agent for specific companies. This has the following effects:\nAgent visibility: If an agent doesn't have any permissions on a specific company, it doesn't appear on the role center when logged in to that company.\nAbility to configure permissions: When an agent has permissions across multiple companies, a user can only configure permissions for the companies where they also have access. The user isn't able to modify permission assignments for companies they can't access themselves.\nPer-company permissions: When a task runs for a specific company, the intersection will only consider permissions defined for that company or all companies.\n### Configuring access controls via code\nThe following example shows how to assign permission sets to an agent. The UpdateAccessControl method replaces any existing permission sets with the ones you provide:\n```al\nprocedure AssignPermissionsToAgent(AgentUserSecurityID: Guid)\nvar\n    Agent: Codeunit Agent;\n    TempAccessControlBuffer: Record \"Access Control Buffer\" temporary;\nbegin\n    // Add the permission sets to assign\n    TempAccessControlBuffer.\"Role ID\" := 'D365 BASIC';\n    TempAccessControlBuffer.Insert();\n\n    TempAccessControlBuffer.\"Role ID\" := 'D365 READ';\n    TempAccessControlBuffer.Insert();\n\n    // Assign the permission sets to the agent\n    Agent.UpdateAccessControl(AgentUserSecurityID, TempAccessControlBuffer);\nend;\n```\n## Agent access controls - who can see and edit the agent\nAn agent access control record defines which users have access to configure an agent. The `Agent Access Control` record contains the following fields:\nAgent User Security ID|User Security ID|Can Configure Agent|Company Name\nThe security ID of the agent user whose access is being controlled.|The security ID of the user who is granted access to the agent.|Indicates whether the user has permission to configure and modify the agent settings.|Name of the company where the access control entry applies.\nThis allows users to be assigned as administrators of specific agent instances, without giving them access to configure all agents. Access can be revoked at any time by setting the `Can Configure Agent` field, either via the Agent card page or through code.\n## Agent administrators\nAn agent administrator is a user who has the \"Configure All Agents\" system permission. This permission is granted by the `AGENT - ADMIN` permission set. Agent administrators can see, configure, and create all agents across the companies where they have the permission assigned.\n### Agent administration permission sets\nTo assign a user as an administrator of all agents, they can be assigned the `AGENT - ADMIN` permission set. This permission set comes with the following privileges:\n Configure All Agents: All agents are configurable by the user.\n Create agents: New agents can be created by the user.\n Configure profiles: Profiles for both users and agents can be configured.\n### Related permission sets\nThe `AGENT - ADMIN` permission set is included in the SECURITY permission set. Users with the SUPER permission set also gain the same privileges.\n## Extension agent creation permissions\n> NOTE\n> The extension agent creation permissions described in this section are available starting with version 28.1 and later.\nTo allow non-admin users to create and activate agents from extensions, the following permission set and configuration page are available:\n### D365 Agent permission set\nThe \"D365 Agent\" permission set grants the \"Create Extension Agent\" system permission. This permission set is included in \"D365 BASIC\", which means most users have it by default. Users with this permission can see extension agents that haven't been configured yet and can create new instances of extension agents from the role center, subject to additional conditions described in Understand agent visibility<ai-development-toolkit-agent-visibility>.\n> NOTE\n> The \"Create Extension Agent\" permission is distinct from the permissions required to create agents through the Agent Design Experience. The Agent Design Experience still requires the \"AGENT - ADMIN\" permission set.\n### Agent Configuration Rights\nThe Agent Configuration Rights page provides an additional layer of control over which users can create which types of extension agents in which companies. By default, all users can create all types of agents in all companies. Agent administrators can restrict this by modifying the rules in this page. For example, an administrator can limit creation so that only specific users can create certain agent types in specific companies.\n### Configuring agent permissions across companies\nWhen a user is assigned to the `AGENT - ADMIN` permission set for a specific company or set of companies, this gives them the right to configure the permissions of the agents, which are defined on that exact set of companies only.\n#### Example - configuring agent permissions across companies\nConsider an environment with three companies: Cronus US, Cronus EU, and Cronus Asia. An agent named \"Sales Agent\" is configured with the `D365 SALES` permission set for Cronus US and Cronus EU.\nScenario|User's `AGENT - ADMIN` assigned for|Can the user configure `D365 Sales` on agent\nExact match|Cronus US, Cronus EU|Yes\nSuperset|Cronus US, Cronus EU, Cronus Asia|Yes\nMissing company|Cronus US only|No\nNo overlap|Cronus Asia only|No\nThe user can only configure an agent's permissions for a specific company if they have `AGENT - ADMIN` assigned for that company.\n## Related information\nCoding agents in AL<ai-agent-sdk-overview>\nai-development-toolkit-overview\nIntegrate with the Tasks AL API<ai-development-toolkit-tasks-api>\nCreate and activate (preview)<ai-development-toolkit-agent-create>\nWrite effective instructions (preview)<ai-development-toolkit-instructions>\nInstruction keywords (preview)<ai-development-toolkit-instruction-keywords>\nSet up permissions and profiles (preview)<ai-development-toolkit-permissions-profiles>\nRun an agent (preview)<ai-development-toolkit-run-agent>\nIterate and manage (preview)<ai-development-toolkit-iterate>\nFrequently asked questions (preview)<ai-development-toolkit-faq>\nBest practices for designing an agent (preview)<ai-development-toolkit-best-practices>\nCreate a Sales Validation Agent (preview)<ai-development-toolkit-sales-validation>\nTransparency note: Business Central AI development toolkit (preview)<transparency-note-ai-development-toolkit>"}