From 3da601be52b22db79023c095196e252269d56a09 Mon Sep 17 00:00:00 2001 From: Darrick Joo Date: Thu, 20 Aug 2026 15:14:13 +0200 Subject: [PATCH] Remove Microsoft Managed background GuiCheck in Azure OpenAI Microsoft Managed Copilot capabilities no longer require a GUI session, so the GuiAllowed guard and its CapabilityBackgroundErr label are removed. The API/OData client type check is unchanged. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- .../App/AI/src/Azure OpenAI/AzureOpenAIImpl.Codeunit.al | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/System Application/App/AI/src/Azure OpenAI/AzureOpenAIImpl.Codeunit.al b/src/System Application/App/AI/src/Azure OpenAI/AzureOpenAIImpl.Codeunit.al index 71731dc20fe..a4e513da926 100644 --- a/src/System Application/App/AI/src/Azure OpenAI/AzureOpenAIImpl.Codeunit.al +++ b/src/System Application/App/AI/src/Azure OpenAI/AzureOpenAIImpl.Codeunit.al @@ -31,7 +31,6 @@ codeunit 7772 "Azure OpenAI Impl" implements "AI Service Name" EmbeddingsFailedWithCodeErr: Label 'Embeddings failed to be generated.'; ChatCompletionsFailedWithCodeErr: Label 'Chat completions failed to be generated.'; AuthenticationNotConfiguredErr: Label 'The authentication was not configured.'; - CapabilityBackgroundErr: Label 'Microsoft Copilot Capabilities are not allowed in the background.'; CapabilityODataErr: Label 'Microsoft Copilot Capabilities are not allowed in API and OData Web Services sessions.'; MessagesMustContainJsonWordWhenResponseFormatIsJsonErr: Label 'The messages must contain the word ''json'' in some form, to use ''response format'' of type ''json_object''.'; EmptyMetapromptErr: Label 'The metaprompt has not been set, please provide a metaprompt.'; @@ -538,9 +537,6 @@ codeunit 7772 "Azure OpenAI Impl" implements "AI Service Name" if ClientTypeManagement.GetCurrentClientType() in [ClientType::Api, ClientType::OData, ClientType::ODataV4, ClientType::SOAP, ClientType::Management] then Error(CapabilityODataErr); - - if (not GuiAllowed()) and (AOAIAuthorization.GetResourceUtilization() = Enum::"AOAI Resource Utilization"::"Microsoft Managed") then - Error(CapabilityBackgroundErr); end; local procedure CheckAuthorizationEnabled(AOAIAuthorization: Codeunit "AOAI Authorization"; CallerModuleInfo: ModuleInfo)