Skip to content

[28.x] Remove Microsoft Managed background GuiCheck in Azure OpenAI - #10455

Open
Darrick (darjoo) wants to merge 1 commit into
releases/28.xfrom
darjoo-remove-msmanaged-guicheck-28x
Open

[28.x] Remove Microsoft Managed background GuiCheck in Azure OpenAI#10455
Darrick (darjoo) wants to merge 1 commit into
releases/28.xfrom
darjoo-remove-msmanaged-guicheck-28x

Conversation

@darjoo

@darjoo Darrick (darjoo) commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

Summary

What & why

AzureOpenAIImpl.GuiCheck blocked Microsoft Managed Copilot capabilities from running whenever GuiAllowed() was false, erroring with "Microsoft Copilot Capabilities are not allowed in the background." That restriction is no longer valid, so the guard is removed along with its now-unused CapabilityBackgroundErr label.

This is a backport to releases/28.x of the same change made on main in #10452.

The rest of GuiCheck is untouched: it still exits early for Self-Managed resource utilization and still errors on Api, OData, ODataV4, SOAP, and Management client types via CapabilityODataErr.

How I validated this

  • I read the full diff and it contains only changes I intended.
  • I built the affected app(s) locally with no new analyzer warnings.
  • I ran the change in Business Central and confirmed it behaves as expected.
  • I added or updated tests for the new behavior, or explained below why none are needed.

What I tested and the outcome

  • The change is a 4-line deletion: the GuiAllowed() guard in GuiCheck plus the CapabilityBackgroundErr label declaration.
  • Searched the app and test projects for CapabilityBackgroundErr and for the "not allowed in the background" message; there are no other references anywhere in the repo.
  • No test asserted the removed behavior, so no tests were added or updated.
  • Local build and in-product verification still need to be done by the PR author before merge.

Risk & compatibility

  • Behavior change: Microsoft Managed Copilot capabilities can now be invoked from non-GUI sessions, for example job queue or background sessions, instead of failing with an error. Callers that relied on that error as a safety net will no longer get it.
  • The CapabilityBackgroundErr label is removed. It was a local label in an internal implementation codeunit, so this is not a breaking API or extension-facing change, though the string will drop out of translation files on the next regeneration.
  • No upgrade, permission, or telemetry impact.
  • This is a release-branch backport and should follow the normal 28.x servicing approval process.

Work Item(s)

Linked work

Fixes AB#647415

Note: no issue number was available in this session. Please fill in the approved issue, and AB#<number> if applicable, before merge.

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>
@github-actions github-actions Bot added this to the Version 28.5 milestone Aug 20, 2026
@github-actions

Copy link
Copy Markdown
Contributor

⚠️ Stale Status Check Deleted

The Pull Request Build workflow run for this PR was older than 72 hours and has been deleted.

📋 Why was it deleted?

Status checks that are too old may no longer reflect the current state of the target branch. To ensure this PR is validated against the latest code and passes up-to-date checks, a fresh build is required.


🔄 How to trigger a new status check:

  1. 📤 Push a new commit to the PR branch, or
  2. 🔁 Close and reopen the PR

This will automatically trigger a new Pull Request Build workflow run.

@alexei-dobriansky

Copy link
Copy Markdown
Contributor

Good Sense Reviewer - Round 1

Recommendation: Accept with Suggestions

What this PR does

This servicing change removes the Azure OpenAI guard that blocked Microsoft Managed Copilot capabilities when the current session had no GUI. It leaves the existing API, OData, SOAP, and Management client-type rejection in place.

The diff is very narrow: only the background GuiAllowed() check and its label are removed. That matches the intended behavior change, and it does not alter authorization checks or the client-type restriction that protects web-service sessions.

Problem-solution fit

Fit: Strong

The requested behavior is to allow Microsoft Managed Copilot capabilities from background sessions while still blocking unsupported service client types. The code does exactly that by removing only the stale background guard.

Suggestions

S1 (🟠 Moderate): Cover the new background-session behavior
This deletion is the whole behavior change, but no regression test proves Microsoft Managed calls are now allowed when GuiAllowed() is false. Add a small test for the background path, and keep the existing API/OData rejection covered if possible. If that path cannot be tested, state the reason in the validation notes.

Risk assessment and necessity

Risk: Moderate. The change expands where Microsoft Managed Azure OpenAI calls can run, including job queue or other non-GUI sessions. The remaining client-type guard limits the broader service-surface risk.

Necessity: Justified if Microsoft Managed capabilities are now supported in background sessions. The narrow deletion is appropriate for a release-branch backport, but a regression test would make the behavior safer to service.


[AI-PR-REVIEW] version=1 promptVersion=4 system=github pr=10455 round=1 by=alexei-dobriansky at=2026-08-26T22:24:34Z lastSha=3da601be52b22db79023c095196e252269d56a09 reviewKey=f969b5f92551eea02bd2b7c4a3967cedd5b89e883592f994afd5efb43a74f824 suggestions=S1@ac8bc6bc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AL: System Application Team: Integrations GitHub request for Integrations area

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants