Skip to content

[CI] /review run-tests: fall back to an AZDO_TRIGGER_PAT secret when Entra sign-in is blocked - #40492

Merged
kubaflo merged 1 commit into
mainfrom
kubaflo-test-pr-40468-behavior
Nov 21, 2026
Merged

kubaflo merged 1 commit into
mainfrom
kubaflo-test-pr-40468-behavior

Conversation

@kubaflo

@kubaflo kubaflo commented Nov 21, 2026

Copy link
Copy Markdown
Contributor

Note

Are you waiting for the changes in this PR to be merged?
It would be very helpful if you could test the resulting artifacts from this PR and let us know in a comment if this change resolves your issue. Thank you!

Target Branch

CI workflow infrastructure follow-up to #40468, so it targets main.

Description of Change

Microsoft Entra currently refuses the federated-identity token exchange with AADSTS53003 (Conditional Access), so /review run-tests cannot queue maui-pr-uitests. When an AZDO_TRIGGER_PAT repository secret exists, Invoke-RunTests.ps1 now authenticates to Azure DevOps with it (Basic auth) instead. Without the secret nothing changes: the OIDC exchange is used.

Validation: queued build 1693568 for #40437 locally with an Azure CLI token through the same script (queue path works); script parses. The PAT path itself needs the secret (scope: Build read & execute) to be exercised.

…Entra sign-in is blocked

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings November 21, 2026 13:21
@kubaflo
kubaflo temporarily deployed to copilot-pat-pool November 21, 2026 13:21 — with GitHub Actions Inactive
@github-actions

Copy link
Copy Markdown
Contributor

🚀 Dogfood this PR with:

⚠️ WARNING: Do not do this without first carefully reviewing the code of this PR to satisfy yourself it is safe.

curl -fsSL https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.sh | bash -s -- 40492

Or

  • Run remotely in PowerShell:
iex "& { $(irm https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.ps1) } 40492"

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
1 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

The untested Azure DevOps PAT dispatch path requires maintainer validation of the secret’s identity, queue/cancel permissions, and acceptability under Entra Conditional Access restrictions.

No open issues 🎉

What changed in this PR

Adds optional personal access token authentication for /review run-tests, allowing the CI dispatcher to queue Azure DevOps UI tests when Entra federated sign-in is blocked. This follows the rollout fixes in #40468.

Changes:

  • Passes the AZDO_TRIGGER_PAT repository secret to the dispatch script.
  • Uses Basic authentication when the secret is present and no explicit token is supplied, preserving explicit bearer-token and OIDC authentication paths.
File Description
.github/​workflows/​review-run-tests-dispatch.yml Exposes the optional PAT secret to the dispatch step.
.github/​scripts/​Invoke-RunTests.ps1 Adds PAT-based authentication while retaining existing token handling.

Review effort: Balanced

@kubaflo

kubaflo commented Nov 21, 2026

Copy link
Copy Markdown
Contributor Author

@dalexsoto stamp

@dalexsoto dalexsoto left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stamping as requested by @kubaflo; no code review performed.

This branch was previously deployed

1 inactive deployment
copilot-pat-pool — 03cfdfdd Deployed Nov 21, 2026 by kubaflo via conclusion #3184
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants