Describe the issue
The System Application Azure OpenAI integration uses a hardcoded API version 2024-06-01 that cannot be configured or overridden by developers. This prevents Business Central extensions from using:
- Latest GPT-4o models (require API version
2024-12-01-preview or later)
- o1-series reasoning models (o1-mini, o1-preview, o1)
- Azure AI Foundry endpoints (
*.inference.ml.azure.com)
- New content filter policies and API features
Code Location: System Application 27.0, Codeunit 7767 "AOAI Authorization"
UrlFormatTxt: Label 'https://%1.openai.azure.com/openai/models?api-version=2024-06-01', Locked = true;
The codeunit is marked Access = Internal, the procedure is local, and the label is Locked = true, making it impossible to extend or override from AL code.
Critical Compatibility Gap (January 2026):
Models compatible with API version 2024-06-01 (gpt-35-turbo, gpt-4 turbo-2024-04-09) have been deprecated/retired as of September 2025. New models require API versions that BC doesn't support, creating a blocker for AI development.
Expected behavior
Business Central should support modern Azure OpenAI deployments through one of these approaches:
Option 1: Update API Version
Update the hardcoded API version to the latest stable version (2024-10-21 or newer) to support current model generations.
Option 2: Make API Version Configurable (Preferred)
Add a public method to allow developers to specify the API version:
procedure SetApiVersion(ApiVersion: Text)
This would provide backward compatibility while enabling access to latest features without waiting for platform updates.
Option 3: Support Multiple Endpoint Formats
Allow Azure AI Foundry and legacy endpoint formats in addition to the current .openai.azure.com restriction.
Steps to reproduce
-
Create Azure OpenAI Resource:
- Navigate to Azure Portal
- Create Azure OpenAI Service resource
- Deploy model:
gpt-4o (version 2024-11-20) or o1-mini
- Note the endpoint URL and deployment name
-
Configure Business Central:
- Create AL extension using System Application Azure OpenAI codeunits
- Use
SetAuthorization() with endpoint, deployment name, and API key
- Set capability with
SetCopilotCapability()
-
Attempt API Call:
AOAIChatMessages.AddSystemMessage('Test');
AOAIChatMessages.AddUserMessage('Hello');
AzureOpenAI.GenerateChatCompletion(AOAIChatMessages, AOAIChatCompletionParams, AOAIOperationResponse);
-
Observe Result:
- Status Code: 400
- Error: "invalid content filter policy" or similar API version incompatibility error
-
Verification with Python SDK:
# Same Azure resource, deployment, and API key with api_version="2024-12-01-preview"
# Result: Works successfully
The issue is confirmed to be the hardcoded API version, not deployment configuration.
Additional context
Environment:
- Business Central: 27.0.38460.44704 (also affects earlier versions)
- System Application: 27.0.0.0
- Deployment: Both SaaS and On-Premises
- Azure OpenAI: All regions
Microsoft Documentation:
Source Code Reference (Verified):
- Repository: microsoft/BCApps
- File:
src/System Application/App/AI/src/Azure OpenAI/AOAIAuthorization.Codeunit.al
- Line 168:
UrlFormatTxt: Label 'https://%1.openai.azure.com/openai/models?api-version=2024-06-01', Locked = true;
- Codeunit 7767 marked
Access = Internal
- Procedure
PerformAOAIAccountVerification is local
I will provide a fix for a bug
Describe the issue
The System Application Azure OpenAI integration uses a hardcoded API version
2024-06-01that cannot be configured or overridden by developers. This prevents Business Central extensions from using:2024-12-01-previewor later)*.inference.ml.azure.com)Code Location: System Application 27.0, Codeunit 7767 "AOAI Authorization"
The codeunit is marked
Access = Internal, the procedure islocal, and the label isLocked = true, making it impossible to extend or override from AL code.Critical Compatibility Gap (January 2026):
Models compatible with API version
2024-06-01(gpt-35-turbo, gpt-4 turbo-2024-04-09) have been deprecated/retired as of September 2025. New models require API versions that BC doesn't support, creating a blocker for AI development.Expected behavior
Business Central should support modern Azure OpenAI deployments through one of these approaches:
Option 1: Update API Version
Update the hardcoded API version to the latest stable version (
2024-10-21or newer) to support current model generations.Option 2: Make API Version Configurable (Preferred)
Add a public method to allow developers to specify the API version:
This would provide backward compatibility while enabling access to latest features without waiting for platform updates.
Option 3: Support Multiple Endpoint Formats
Allow Azure AI Foundry and legacy endpoint formats in addition to the current
.openai.azure.comrestriction.Steps to reproduce
Create Azure OpenAI Resource:
gpt-4o(version 2024-11-20) oro1-miniConfigure Business Central:
SetAuthorization()with endpoint, deployment name, and API keySetCopilotCapability()Attempt API Call:
Observe Result:
Verification with Python SDK:
The issue is confirmed to be the hardcoded API version, not deployment configuration.
Additional context
Environment:
Microsoft Documentation:
2024-10-212024-12-01-preview/openai/v1/pathSource Code Reference (Verified):
src/System Application/App/AI/src/Azure OpenAI/AOAIAuthorization.Codeunit.alUrlFormatTxt: Label 'https://%1.openai.azure.com/openai/models?api-version=2024-06-01', Locked = true;Access = InternalPerformAOAIAccountVerificationislocalI will provide a fix for a bug