Edit

Share via


Business Central AI resources (preview)

[This article is prerelease documentation and is subject to change.]

A key feature of the Business Central developer tools for Copilot is that Business Central partners can use Large Language Models (LLMs) via Microsoft-managed Azure OpenAI resources for their AppSource extensions that extend Copilot in Business Central. This approach eliminates the need to independently procure and manage Azure OpenAI subscriptions for customers.

Using the Business Central AI resources is the default and recommended approach.

In certain cases, partners or customers might need to use their own Azure OpenAI (AOAI) subscription for production environments, or when developing and testing in sandbox environments. Business Central developer tools for Copilot fully support this option when specific requirements make it necessary.

Important

  • This is a preview feature.
  • Preview features aren’t meant for production use and might have restricted functionality. These features are subject to supplemental terms of use, and are available before an official release so that customers can get early access and provide feedback.

Supported models

The following Azure OpenAI models are supported when using the Business Central developer tools for Copilot and Business Central AI resources.

Azure OpenAI model Supported
GPT-4o Yes, will be replaced by GPT-4.1
GPT-4o-mini Yes, will be replaced by GPT-4.1-mini
GPT-4.1 Pending
GPT-4.1-mini June 2025

You can read more about each of the models here Azure OpenAI Models.

Benefits of relying on the Business Central AI resources

Using the AI resources provides several benefits, including:

  • Reduced operational overhead
    Avoid the need to handle infrastructure management, updates, monitoring, troubleshooting, or maintenance of custom Azure OpenAI subscriptions, freeing up resources to focus on core business operations and providing value-adding IP to customers.
  • Simplified onboarding
    Quickly integrate AI capabilities into your solutions without having to navigate the complexities of setting up and managing your own Azure OpenAI subscription.
  • Improved reliability
    Proactive scaling, throttling, load balancing, and fault tolerance measures, ensuring consistent performance during peak demand.
  • Enhanced security compliance
    Built-in compliance measures and governance, including robust protection from malicious and harmful content, ensuring compliance with data residency requirements, reducing the burden of ensuring regulatory compliance for ISVs.
  • Streamlined experience for customers
    Customers experience a more seamless AI resource management process, avoiding the need to maintain different configurations for separate ISV solutions.

Consumption-based customer billing when using Business Central AI resources

By using the Business Central AI resources, you can deliver a cohesive AI consumption tracking and billing experience for Business Central customers. Customers who use AI resources across multiple AI-enabled solutions built with Business Central developer tools for Copilot benefit from a unified approach to AI consumption monitoring and invoicing, thereby they avoid the need to reconcile multiple invoices or metrics from separate ISVs.

This allows customers to:

  • Track AI consumption at a granular level, per Copilot feature.
  • Receive a consolidated invoice for AI consumption.

Business Central AI resources are billed in alignment with Copilot Studio message billing, and follow the AI Tools rates, that depends on the underlying language model of the Copilot feature prompts.

Business Central AI resources model AI Tools rate
GPT-4o Standard
GPT-4o-mini Basic
GPT-4.1 Standard
GPT-4.1-mini Basic

Learn more about the rates under AI Tools in Billing rates and management

Note

It's important to note that the AI billing model isn't intended to replace the existing AppSource monetization pathway for Business Central apps. Instead, it serves as another option to simplify AI consumption for customers and partners, with the AppSource monetization option available to ISVs to monetize their intellectual property (IP).

Use your own subscription with customers

For most ISVs, the default Business Central AI resources are enough, However, if you have needs that aren't fulfilled with the Business Central AI resources, such as specific models including fine-tuned ones, you can bring your own (BYO) subscription to customers. If that's the case, the ISV is responsible for the deployment, maintenance, scaling, and security of the service - and the billing of AI resources to customers.

Differences between Business Central AI resources and custom Azure OpenAI subscriptions

By using the Business Central developer tools for Copilot, partners can easily get access to AI resources when they extend Copilot in Business Central.

Business Central AI resources are identical to those used in base application Copilot features and are the recommended default option. Partners, however, might sometimes need to use their own or customer-owned Azure OpenAI subscription in production environments when they have specific requirements. The following section provides an overview of the major differences between using the AI resources in the toolkit and using your own Azure OpenAI subscription and model deployment.

Area Business Central AI resources Your own AOAI subscription
Deployment Microsoft manages the AI resources.

We ask you to have an active Azure OpenAI subscription for sign-up, but no model.
You must handle deploying models, keep them up to date, set up Azure subscriptions, take care of geography and data residency, etc.

You're charged for deployed models even if they aren't used.
Model support Production-ready models available (today GPT-4o and GPT-4o-mini, more in the future).

Get notified via developer telemetry when new models are coming, and old models are obsoleted. Observe that when models are discontinued, partners will be accountable for migrating to newer models and model versions as dictated by Microsoft within communicated SLA.

Embeddings aren't yet available.
All Azure OpenAI models are available.

Follow Azure OpenAI model deprecation timelines.

Embeddings and fine tuning are available depending on your model.
Responsible AI Azure OpenAI content filters predefined by Business Central.

Microsoft automatically appends safeguard prompts to your system prompt that increase protection against typical harms such as generation of harmful content and prompt injection attacks.
Azure OpenAI content filters, configurable by you.

Microsoft automatically appends safeguard prompts to your system prompt that increase protection against typical harms such as generation of harmful content and prompt injection attacks in Saas
Environments SaaS only Can be used in SaaS, and for testing in containers.
Billing Microsoft charges the customer when they use AI.

Customers can track usage, set limits, and get a single, detailed invoice across Copilot features that use the toolkit AI resources.

You charge the customer for your IP.
You must track billing, split billing if multiple customers share the same subscription, manage spending limits, provide usage statistics etc.
Geographic availability AI model endpoints are available in limited Azure geographies, managed by Microsoft, that may change over time. You can find the list of currently supported Azure geos here.

Customer environments in all other geos connect to endpoints in the US and are managed by the data governance controls provided to administrators in Business Central.
Availability follows the general availability of the chosen model in Azure OpenAI. See Azure OpenAI Models for more.

Mandatory to migrate to newer models as older ones are deprecated

Models evolve and are replaced over time. By using the Business Central AI resources, partners will be accountable for migrating to newer models and model versions as dictated by Microsoft within the communicated SLA. Failure to do so can lead to Copilot features using the deprecated model in Business Central AI resources to no longer work in production.

Using the Business Central AI resources and your own subscription in AL

The default and recommended approach is to use the developer toolkit AI resources when extending Copilot in Business Central. All you need to do is to authenticate with the SetManagedResourceAuthorization method in the AI Module AzureOpenAI codeunit. As part of this, you also need to provide your own AzureOpenAI subscription details, but this isn't used or billed when authenticating with SetManagedResourceAuthorization.

// Example of using the default toolkit AI resources in AL 
AzureOpenAI.SetManagedResourceAuthorization(Enum::"AOAI Model Type"::"Chat Completions",AzureOpenAIAccountName,AzureOpenAIApiKey,AOAIDeployments.GetGPT4oLatest());

If you instead want to use your own subscription, whether for a customer, or just when you develop or test, you must authenticate with your own subscription using the SetAuthorization method.

// Example of using your own Azure OpenAI subscription in AL 
AzureOpenAI.SetAuthorization(Enum::"AOAI Model Type"::"Chat Completions",GetEndpoint(),GetDeployment(),GetApiKey());

Use your own subscription during development

The Business Central AI resources can only be used in customer production environments. Therefore, it's recommended that partners create and use their own Azure OpenAI subscriptions as part of noncustomer usage, for example, when prototyping, developing, testing, and supporting AI capabilities.

Note

To use the Business Central AI resources in an app, the partner must provide information about their own Azure OpenAI subscription. This is to ensure that the partner is aware of and has accepted Azure OpenAI Service data, privacy and security policies.

The Business Central developer tools for Copilot easily allow conditionally branching on the Azure OpenAI subscription used, for example, using the Business Central AI resources when running in customer environments and a custom Azure OpenAI subscription for the rest.

Code snippet

The following code snippet demonstrates how to use the EnvironmentInformation to use a custom Azure OpenAI subscription during prototyping, developing, and testing, and the Business Central AI resources in customers production environments.

If not EnvironmentInformation.IsSaaSInfrastructure() then
    AzureOpenAI.SetAuthorization(Enum::"AOAI Model Type"::"Chat Completions",GetEndpoint(),GetDeployment(),GetApiKey());
else
    AzureOpenAI.SetManagedResourceAuthorization(Enum::"AOAI Model Type"::"Chat Completions",AzureOpenAIAccountName,AzureOpenAIApiKey,AOAIDeployments.GetGPT4oLatest());

Samples

You can find further AL code examples on using and calling LLM resources on https://aka.ms/BCTech.

Integrating AI using Developer Tools for Copilot
Transparency note: Developer tools for Copilot in Business Central