---
id: post/demiliani-com/17710
type: post
title: Copilot Quota and AI consumption in Business Central.
summary: Copilot and AI features in Business Central now consume Copilot Credits with limits. The System Application provides codeunit 7785 'Copilot Quota' that checks tenant capacity, and developers can use it as a pre-flight check before calling AI models. Additional tools track billing type, token usage, and consumption telemetry to monitor AI costs.
tier: community
language: en
tags:
  - copilot credits
  - ai consumption
  - quota management
  - billing
  - token usage
  - telemetry
system: copilot
review:
  state: reviewed
  by: opus
  at: "2026-12-04T01:06:26.516Z"
  flags: []
generated:
  at: "2026-12-04T00:17:10.168Z"
  pipeline: 0.2.0
  prompts:
    extract-post: 1
  input_hash: ebaab5a9e2245a6ca020aa702cc6e98b85917f137aca49431388d49e5dbfd043
evidence:
  - kind: blog
    url: https://demiliani.com/2026/12/03/copilot-quota-and-ai-consumption-in-business-central/
    title: Copilot Quota and AI consumption in Business Central.
    date: "2026-12-03"
    commit: null
    t: null
    quote: null
  - kind: blog
    url: https://demiliani.com/2026/12/03/copilot-quota-and-ai-consumption-in-business-central/
    title: Copilot Quota and AI consumption in Business Central.
    date: "2026-12-03"
    commit: null
    t: null
    quote: If the platform can't return quota details, the method returns false. On-premises or in a Docker sandbox you should not expect true.
links:
  learn: []
  objects:
    - object/codeunit/7785
    - object/codeunit/7786
    - object/codeunit/7757
    - object/page/7775
    - object/codeunit/7759
    - object/enum/7786
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
  related:
    - to: https://learn.microsoft.com/dynamics365/business-central/ai-copilot-data-movement
      title: Data movement across geographies for Business Central Copilot and agent capabilities
      label: possibly related
      why: names Page 7775 "Copilot AI Capabilities"
      by: code
    - to: https://learn.microsoft.com/dynamics365/business-central/dev-itpro/ai/ai-agent-sdk-define-register
      title: Define and register an agent programmatically (preview)
      label: possibly related
      why: names Enum 7786 "Copilot Billing Type"
      by: code
post_id: "17710"
source_id: demiliani-com
source_name: Stefano Demiliani
url: https://demiliani.com/2026/12/03/copilot-quota-and-ai-consumption-in-business-central/
published_at: "2026-12-03T08:19:27.000Z"
author: Stefano Demiliani
full_text: false
words: 1365
quotes:
  - text: If the platform can't return quota details, the method returns false. On-premises or in a Docker sandbox you should not expect true.
    why_it_matters: Critical context that CanConsume() is SaaS-specific and developers must handle on-premises environments differently
code_objects_mentioned:
  - codeunit Copilot Quota
  - codeunit Copilot Quota Impl.
  - codeunit Copilot Notifications
  - page Copilot AI Capabilities
  - codeunit AOAI Token
  - enum Copilot Billing Type
systems:
  - copilot
  - development
  - platform
versions_mentioned:
  - "27.0"
cautions:
  - kind: gotcha
    quote: If the platform can't return quota details, the method returns false. On-premises or in a Docker sandbox you should not expect true
    objects:
      - type: codeunit
        name: Copilot Quota
    events: []
    versions: []
  - kind: warning
    quote: Calling it in a tight loop produces telemetry noise, so call it once per user action.
    objects:
      - type: codeunit
        name: Copilot Quota
    events: []
    versions: []
  - kind: gotcha
    quote: It's cumulative for the server session, across all models. There's no split by prompt and completion, capability or app.
    objects:
      - type: codeunit
        name: AOAI Token
    events: []
    versions: []
preview:
  embeddable: true
  frame_url: https://demiliani.com/2026/12/03/copilot-quota-and-ai-consumption-in-business-central/embed/
  image: https://demiliani.com/wp-content/uploads/2026/12/bccopilotquotaimpl_00.png
  image_alt: null
  image_w: 1140
  image_h: 599
  site_name: Stefano Demiliani
  favicon: https://demiliani.com/wp-content/uploads/2022/09/sd_wordpress_logo.png?w=32
  probed_at: "2026-12-04T01:03:32.508Z"
---

# Copilot Quota and AI consumption in Business Central.

[Read the post](https://demiliani.com/2026/12/03/copilot-quota-and-ai-consumption-in-business-central/) · Stefano Demiliani (Stefano Demiliani, MVP) · 2026-12-03 · 1365 words · tier community · reviewed (checked by Opus)

> Copilot and AI features in Business Central now consume Copilot Credits with limits. The System Application provides codeunit 7785 'Copilot Quota' that checks tenant capacity, and developers can use it as a pre-flight check before calling AI models. Additional tools track billing type, token usage, and consumption telemetry to monitor AI costs.

## Key points

- AI features are billed via Copilot Credits with capacity limits; CanConsume() checks if the tenant can still consume capacity
- The public facade codeunit 7785 delegates to internal implementation 7786, which communicates with the platform through ALCopilotFunctions
- Developers should wrap CanConsume() once and check before building prompts; in unattended processing, check once before the loop, not per record
- Three billing types exist: Not Billed, Microsoft Billed, and Custom Billed; declared when registering a capability
- Token usage can be estimated pre-call with GetGPT4TokenCount or measured post-call with GetTotalServerSessionTokensConsumed; telemetry signals 0000LT4 and RT0055 track consumption

## Quotes

- "If the platform can't return quota details, the method returns false. On-premises or in a Docker sandbox you should not expect true." (Critical context that CanConsume() is SaaS-specific and developers must handle on-premises environments differently)

## 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.

- [codeunit 7785 "Copilot Quota"](../../objects/codeunit/7785.md)
- [codeunit 7786 "Copilot Quota Impl."](../../objects/codeunit/7786.md)
- [codeunit 7757 "Copilot Notifications"](../../objects/codeunit/7757.md)
- [page 7775 "Copilot AI Capabilities"](../../objects/page/7775.md)
- [codeunit 7759 "AOAI Token"](../../objects/codeunit/7759.md)
- [enum 7786 "Copilot Billing Type"](../../objects/enum/7786.md)

## Possibly related

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

- [Data movement across geographies for Business Central Copilot and agent capabilities](https://learn.microsoft.com/dynamics365/business-central/ai-copilot-data-movement) — possibly related: names Page 7775 "Copilot AI Capabilities"
- [Define and register an agent programmatically (preview)](https://learn.microsoft.com/dynamics365/business-central/dev-itpro/ai/ai-agent-sdk-define-register) — possibly related: names Enum 7786 "Copilot Billing Type"

## Heads up

- gotcha: "If the platform can't return quota details, the method returns false. On-premises or in a Docker sandbox you should not expect true" (about codeunit Copilot Quota)
- warning: "Calling it in a tight loop produces telemetry noise, so call it once per user action." (about codeunit Copilot Quota)
- gotcha: "It's cumulative for the server session, across all models. There's no split by prompt and completion, capability or app." (about codeunit AOAI Token)

## Context

- Features: Copilot quota checking, Copilot Credits consumption, Billing type declaration, Token counting, AI consumption telemetry, Quota notifications, Background task result handling
- Versions: 27.0

Source: Stefano Demiliani, community blog. Summary, key points and quotes are derived (CONTENT-NOTICE.md); read the original for the full text.
