---
title: "Codeunit 2000000022 Agent Utilities"
author: "JOP-AL"
url: https://jonas-paprotka.de/ref/codeunit/2000000022-agent-utilities/
type: codeunit
id: 2000000022
name: "Agent Utilities"
app: "System"
namespace: System.Agents
versions: "27-29"
build: 29.0.55597.0
countries: "W1"
checked: 2026-11-20
changed: 2026-10-05
subject: "Microsoft Dynamics 365 Business Central"
license: "Metadata from Microsoft's symbol packages. AL source MIT, Copyright (c) Microsoft Corporation. Selection and wording © 2026 JOP-AL. https://jonas-paprotka.de/licenses/"
---

# Codeunit 2000000022 Agent Utilities

JOP-AL, https://jonas-paprotka.de/ref/codeunit/2000000022-agent-utilities/

| | |
| --- | --- |
| App | System |
| Namespace | System.Agents |
| Versions | 27-29 |
| Minors | W1 27.0, 28.0, 29.0, [every minor](https://jonas-paprotka.de/ref/codeunit/2000000022-agent-utilities/editions.json) |
| Source file | System Codeunits/Agents/AgentUtilities.Codeunit.al |

## Procedures

| Name | Parameters | Returns | Access | Versions | Obsolete | Reason |
| --- | --- | --- | --- | --- | --- | --- |
| SetInstructions | (AgentUserID: Guid; Instructions: SecretText) | - | public | 27-29 | - | - |
| GetInstructions | (AgentUserID: Guid) | SecretText | public | 27-29 | - | - |
| IsAgentSession | (var ActiveAgentMetadataProvider: Enum "Agent Metadata Provider") | Boolean | public | 27-29 | - | - |
| BlockPageFromBeingOpenedByAgent | () | - | public | 27-29 | - | - |
| GetCurrentSessionAgentTaskId | () | Integer | public | 27-29 | - | - |
| GetCurrentSessionAgentMetadataProviderType | () | Integer | public | 27-29 | - | - |
| UpdateAccessControl | (AgentUserSecurityId: Guid; var TempAccessControlBuffer: Record "Access Control Buffer" temporary) | - | public | 27-29 | - | - |
| UpdateCustomAgentAccessControls | (AgentUserSecurityId: Guid; var TempAccessControlBuffer: Record "Access Control Buffer" temporary) | - | public | 27-29 | - | - |
| DeleteCustomAgent | (AgentUserSecurityId: Guid) | - | public | 27-29 | - | - |
| TryGetAgentPublisherInfo | (AgentMetadataProvider: Enum "Agent Metadata Provider"; var AgentPublisherName: Text[250]; var AgentPublisherType: Enum "Agent Publisher Type") | Boolean | public | 27-29 | - | - |
| TryGetAgentAppInfo | (AgentMetadataProvider: Enum "Agent Metadata Provider"; var AppPublisher: Text[250]; var AppName: Text[250]; var AppId: Guid) | Boolean | public | 28-29 | - | - |
| CurrentUserHasConfigureAllAgentsPermissionInAllCompanies | () | Boolean | public | 28-29 | - | - |
| IsAgentsFeatureEnabled | () | Boolean | public | 28-29 | - | - |
| CanCurrentUserCreateAgent | (AgentMetadataProvider: Enum "Agent Metadata Provider") | Boolean | public | 28-29 | - | - |
| GetConsumedCopilotCredits | (TaskId: BigInteger) | Decimal | public | 28-29 | - | - |
| GetOrCreatePersonalAgent | () | Guid | public | 29 | - | - |

## Source

Symbols: Microsoft.Platform.symbols, https://dynamicssmb2.pkgs.visualstudio.com/DynamicsBCPublicFeeds/_packaging/MSSymbols/nuget/v3/index.json, highest build per major on 2026-11-20.

JOP-AL, 2026-11-20.
