---
id: object/codeunit/3352
type: object
title: Codeunit 3352 "Payables Agent Metadata"
summary: Codeunit 3352 "Payables Agent Metadata" in PayablesAgent (Microsoft.Agent.PayablesAgent). 16 public procedures, 2 event subscribers. Introduced in BC30.
tier: official
language: en
tags:
  - codeunit
  - payablesagent
versions:
  introduced: "30"
  last_changed: null
  deprecated: null
review:
  state: derived
  by: null
  at: null
  flags: []
generated:
  at: "2026-12-04T01:00:01.459Z"
  pipeline: 0.2.0
  prompts: {}
  input_hash: dc877eefa9791dcb2f63775690744135bc6c476e3cf7689764755a010a36e38d
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/f53bb0f1ecd89fde9f133f9dcaf5bf43cf5f2671/src/Apps/W1/PayablesAgent/app/Flows/Registration/PayablesAgentMetadata.Codeunit.al
    title: src/Apps/W1/PayablesAgent/app/Flows/Registration/PayablesAgentMetadata.Codeunit.al (main)
    date: null
    commit: f53bb0f1ecd89fde9f133f9dcaf5bf43cf5f2671
    t: null
    quote: null
links:
  learn: []
  objects: []
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
  changes:
    - change/bcapps/14739
    - change/bcapps/13361
  related:
    - to: https://learn.microsoft.com/dynamics365/business-central/payables-agent
      title: Payables Agent Overview in Business Central
      label: possibly related
      why: Documents the Payables Agent autonomous AI agent that this metadata codeunit supports.
      by: model
    - to: https://learn.microsoft.com/dynamics365/business-central/payables-agent-setup
      title: Set Up Payables Agent in Business Central
      label: possibly related
      why: Documents Payables Agent setup and configuration that this metadata codeunit enables.
      by: model
object_type: codeunit
object_id: 3352
name: Payables Agent Metadata
namespace: Microsoft.Agent.PayablesAgent
app: PayablesAgent
extends: null
first_version: "30"
last_version: "30"
present_in:
  - "30"
changed_in: []
source_major: "30"
obsolete: null
countries: []
ms_search_form_ids: []
counts:
  fields: 0
  procedures: 18
  events: 0
  subscribers: 2
relations:
  out: 0
  referenced_by: 0
  pages: 0
  extended_by: 0
  event_subscribers: 0
  calls: 7
  called_by: 2
  implements: 0
---

# Codeunit 3352 "Payables Agent Metadata"

> Codeunit 3352 "Payables Agent Metadata" in PayablesAgent (Microsoft.Agent.PayablesAgent). 16 public procedures, 2 event subscribers. Introduced in BC30.

PayablesAgent · Microsoft.Agent.PayablesAgent · BC30 · [source at f53bb0f1](https://github.com/microsoft/BCApps/blob/f53bb0f1ecd89fde9f133f9dcaf5bf43cf5f2671/src/Apps/W1/PayablesAgent/app/Flows/Registration/PayablesAgentMetadata.Codeunit.al) · facts from BC30

## Properties

| Property | Value |
|---|---|
| Access | Internal |
| Subtype | Install |
| Permissions | tabledata User = R, tabledata Agent = R, tabledata "Agent Task Message" = R |

## Event subscriptions

- OnRegisterCopilotCapability subscribes to Page "Copilot AI Capabilities" OnRegisterCopilotCapability
- ClassifyDataSensitivity subscribes to Codeunit "Data Classification Eval. Data" OnCreateEvaluationDataOnAfterClassifyTablesToNormal

## Procedures

- `GetInitials(AgentUserId: Guid): Text[4]`
- `GetSetupPageId(AgentUserId: Guid): Integer`
- `GetSummaryPageId(AgentUserId: Guid): Integer`
- `GetAgentTaskMessagePageId(AgentUserId: Guid; MessageId: Guid): Integer`
- `GetAgentAnnotations(AgentUserId: Guid; var Annotations: Record "Agent Annotation")`
- `GetDefaultInitials(): Text[4]`
- `AgentDisplayName(): Text[80]` (internal)
- `AgentSummary(): Text` (internal)
- `GetFirstTimeSetupPageId(): Integer`
- `ShowCanCreateAgent(): Boolean`
- `GetCopilotCapability(): Enum "Copilot Capability"`
- `GetDefaultProfile(var TempAllProfile: Record "All Profile" temporary)`
- `GetDefaultAccessControls(var TempAccessControlBuffer: Record "Access Control Buffer" temporary)`
- `IsArchivingSupported(): Boolean`
- `RegisterCapability()` (internal)
- `PayablesAgentExistsAcrossAllCompanies(): Boolean` (internal)

## Triggers

OnInstallAppPerDatabase

## Calls

From the extracted call graph of BC30 (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 3343 "PA Setup"](../codeunit/3343.md) (4 calls: `GetDefaultAccessControls → GetAgentPermissionSet`, `GetDefaultAccessControls → LoadStoredOrDefaults`, `GetDefaultProfile → GetAgentProfile`, …)
- [Codeunit 7773 "Copilot Capability"](../codeunit/7773.md) (3 calls: `RegisterCapability → IsCapabilityRegistered`, `RegisterCapability → ModifyCapability`, `RegisterCapability → RegisterCapability`)
- [Codeunit 4321 "Agent"](../codeunit/4321.md) (2 calls: `GetAgentAnnotations → IsActive`, `GetDefaultProfile → PopulateDefaultProfile`)
- [Codeunit 1751 "Data Classification Eval. Data"](../codeunit/1751.md) (1 call: `ClassifyDataSensitivity → SetTableFieldsToNormal`)
- [Codeunit 3330 "PA Work Item Presentation"](../codeunit/3330.md) (1 call: `GetAgentTaskMessagePageId → GetMessagePageId`)
- [Codeunit 3350 "PA Agent Access"](../codeunit/3350.md) (1 call: `ShowCanCreateAgent → AllowCreateNewAgent`)
- [Codeunit 457 "Environment Information"](../codeunit/457.md) (1 call: `RegisterCapability → IsSaaSInfrastructure`)

## Called by

- [Codeunit 3305 "Payables Agent Upgrade"](../codeunit/3305.md) (2 calls: `RegisterCapability → RegisterCapability`, `RegisterTrial → PayablesAgentExistsAcrossAllCompanies`)
- [Codeunit 3321 "PA Setup Update Parameters"](../codeunit/3321.md) (2 calls: `InitializeFromStoredSetup → AgentDisplayName`, `InitializeFromStoredSetup → AgentSummary`)

## Recent changes

- 2026-12-03 [#14739 Opting in for Data query tools in Agent metadata for PA](../../changes/bcapps/14739.md) (main, BC30, feature)
- 2026-11-14 [#13361 Foundation for Payables Agent V2.0](../../changes/bcapps/13361.md) (main, BC30, refactor, added)

## Across versions

- Present in: BC30
- Changed (declaration) in: none

## Possibly related

No source states these links: they share an object, a model read them, or a person found the same subject.

- [Payables Agent Overview in Business Central](https://learn.microsoft.com/dynamics365/business-central/payables-agent) — possibly related: Documents the Payables Agent autonomous AI agent that this metadata codeunit supports. (model-linked)
- [Set Up Payables Agent in Business Central](https://learn.microsoft.com/dynamics365/business-central/payables-agent-setup) — possibly related: Documents Payables Agent setup and configuration that this metadata codeunit enables. (model-linked)

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 BC30 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: "Payables Agent Metadata")`, then `bcatlas_get_procedure_body` or `bcatlas_get_neighbors` on the returned id.
