---
id: object/codeunit/4317
type: object
title: Codeunit 4317 "Agent System Permissions"
summary: Codeunit 4317 "Agent System Permissions" in System Application (System.Agents). 7 public procedures. Introduced in BC27, still in BC30, changed in BC28.
tier: official
language: en
tags:
  - codeunit
  - system application
versions:
  introduced: "27"
  last_changed: "28"
  deprecated: null
review:
  state: derived
  by: null
  at: null
  flags: []
generated:
  at: "2026-10-11T00:31:51.816Z"
  pipeline: 0.2.0
  prompts: {}
  input_hash: 2f623653f6e31c22defd240a1fc52eae7a3929792881bfda07b5549167867034
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/System%20Application/App/Agent/Permissions/AgentSystemPermissions.Codeunit.al
    title: src/System Application/App/Agent/Permissions/AgentSystemPermissions.Codeunit.al (releases/29.x)
    date: null
    commit: ea08af5ef2d6a9b5c5af4a029288abbe2c883220
    t: null
    quote: null
links:
  learn: []
  objects: []
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
object_type: codeunit
object_id: 4317
name: Agent System Permissions
namespace: System.Agents
app: System Application
extends: null
first_version: "27"
last_version: "30"
present_in:
  - "27"
  - "28"
  - "29"
  - "30"
changed_in:
  - "28"
source_major: "29"
obsolete: null
countries: []
ms_search_form_ids: []
counts:
  fields: 0
  procedures: 7
  events: 0
  subscribers: 0
relations:
  out: 0
  referenced_by: 0
  pages: 0
  extended_by: 0
  event_subscribers: 0
  calls: 1
  called_by: 10
  implements: 0
---

# Codeunit 4317 "Agent System Permissions"

> Codeunit 4317 "Agent System Permissions" in System Application (System.Agents). 7 public procedures. Introduced in BC27, still in BC30, changed in BC28.

System Application · System.Agents · BC27-30 · [source at ea08af5e](https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/System%20Application/App/Agent/Permissions/AgentSystemPermissions.Codeunit.al) · facts from BC29

## Procedures

- `CurrentUserCanSeeConsumptionData(): Boolean`: Gets whether the current user has permissions to see all consumption data.
- `CurrentUserHasCanManageAllAgentsInAllCompaniesPermission(): Boolean`: Gets whether the current user has permissions to manage all agents in all companies.
- `CurrentUserHasCanManageAllAgentsPermission(): Boolean`: Gets whether the current user has permissions to manage all agents.
- `CurrentUserHasTroubleshootAllAgents(): Boolean`: Gets whether the current user has permissions to troubleshoot the execution of agent tasks.
- `CurrentUserHasCanCreateCustomAgent(): Boolean`: Gets whether the current user has permissions to create custom agents.
- `CurrentUserCanUseAgent(AgentUserSecurityId: Guid): Boolean`: Gets whether the current user has permissions to use a specific agent.
- `CurrentUserCanManageAgent(AgentUserSecurityId: Guid): Boolean`: Gets whether the current user has permissions to manage a specific agent.

## Calls

From the extracted call graph of BC29 (graphify-al on the snapshot checkout): calls whose target is known from a declared type or an `Object::"Name"` argument. Interface dispatch and calls through events are not counted, so the list is not complete.

- [Codeunit 4318 "Agent System Permissions Impl."](../codeunit/4318.md) (7 calls: `CurrentUserCanManageAgent → CurrentUserCanManageAgent`, `CurrentUserCanSeeConsumptionData → CurrentUserCanSeeConsumptionData`, `CurrentUserCanUseAgent → CurrentUserCanUseAgent`, …)

## Called by

- [Codeunit 4362 "Agent Designer Permissions"](../codeunit/4362.md) (6 calls: `CurrentUserCanCreateCustomAgents → CurrentUserHasCanCreateCustomAgent`, `CurrentUserCanCreateCustomAgents → CurrentUserHasCanManageAllAgentsPermission`, `CurrentUserCanDeleteCustomAgents → CurrentUserHasCanManageAllAgentsPermission`, …)
- [Page 4333 "Agent Consumption Overview"](../page/4333.md) (3 calls: `SendNonAdminDisclaimerNotification → CurrentUserHasCanManageAllAgentsInAllCompaniesPermission`, `ValidateAgentAccessControl → CurrentUserCanUseAgent`, `ValidateAgentAccessControl → CurrentUserHasCanManageAllAgentsPermission`)
- [Codeunit 3307 "Payables Agent Setup"](../codeunit/3307.md) (1 call: `AllowCreateNewAgent → CurrentUserHasCanManageAllAgentsPermission`)
- [Codeunit 4400 "SOA Setup"](../codeunit/4400.md) (1 call: `AllowCreateNewSOAgent → CurrentUserHasCanManageAllAgentsPermission`)
- [Codeunit 6922 "Expense Agent Entra App Mgt."](../codeunit/6922.md) (1 call: `VerifyCurrentUserCanManageExpenseAgent → CurrentUserHasCanManageAllAgentsPermission`)
- [Codeunit 6998 "EA Metadata Provider"](../codeunit/6998.md) (1 call: `ShowCanCreateAgent → CurrentUserHasCanManageAllAgentsPermission`)
- [Page 4315 "Agent Card"](../page/4315.md) (1 call: `OnOpenPage → CurrentUserCanManageAgent`)
- [Page 4400 "SOA Setup"](../page/4400.md) (1 call: `OnOpenPage → CurrentUserCanManageAgent`)
- [Page 6991 "Expense Agent Setup Wizard"](../page/6991.md) (1 call: `OnOpenPage → CurrentUserHasCanManageAllAgentsPermission`)
- [Page 6996 "Expense Agent Setup"](../page/6996.md) (1 call: `OnOpenPage → CurrentUserHasCanManageAllAgentsPermission`)

## Across versions

- Present in: BC27-30
- Changed (declaration) in: BC28

Source: AL metadata extracted from the code (names, ids, signatures, properties); no code bodies (D10).

## Ask your agent

Procedure bodies are not stored here (D10). The call sections above are our own, per object, from the BC29 call graph. For a procedure body or the calls of one procedure, ask bc-code-atlas (external, by Stefan Maron, MIT; default corpus w1-28), which the bc-observatory plugin connects: `bcatlas_resolve_node(object_type: "codeunit", object_name: "Agent System Permissions")`, then `bcatlas_get_procedure_body` or `bcatlas_get_neighbors` on the returned id.
