Skip to content

Replace PAT with WIF service connection for VS insertion#19683

Merged
T-Gro merged 3 commits into
dotnet:mainfrom
missymessa:dev/migrate-pat-to-wif-10091
May 7, 2026
Merged

Replace PAT with WIF service connection for VS insertion#19683
T-Gro merged 3 commits into
dotnet:mainfrom
missymessa:dev/migrate-pat-to-wif-10091

Conversation

@missymessa
Copy link
Copy Markdown
Member

Summary

Migrate the VS insertion pipeline authentication from the dn-bot-devdiv-build-rw-code-rw-release-rw PAT to the dnceng-fsharp-vs-insertion-wif Entra Workload Identity Federation (WIF) service connection.

Changes

  • Remove DotNet-VSTS-Infra-Access variable group reference (no longer needed)
  • Remove InsertAccessToken variable that pulled from the PAT secret
  • Add AzureCLI@2 step that authenticates via the WIF service connection and acquires a bearer token for Azure DevOps
  • Set InsertAccessToken as a secret pipeline variable from the WIF-acquired token

Context

This is part of the dnceng PAT-to-Entra migration (WI 10091). The 1ES PAT disable policy requires all non-packaging PATs to be migrated to Entra-based credentials.

The replacement service connection \dnceng-fsharp-vs-insertion-wif\ uses:

  • App Registration: \dnceng-fsharp-vs-insertion-wif\ (appId: \�f297404-7399-4e71-ac5f-f9be7bca6904)
  • WIF Service Connection in dnceng/internal (id: \84a9d9d1-ab12-4359-a544-0ac10c2934fd)
  • DevDiv enrollment: SP enrolled with Contribute, Contribute to PRs, Create tag, Manage notes, Read on the VS repo

Validation

  • Post-merge: monitor the first insertion build to confirm \AzureCLI@2\ authenticates successfully and \MicroBuildInsertVsPayload@5\ creates the VS insertion PR

Migrate from dn-bot-devdiv-build-rw-code-rw-release-rw PAT to the
dnceng-fsharp-vs-insertion-wif Entra WIF service connection for
authenticating to DevDiv when creating VS insertion PRs.

- Remove DotNet-VSTS-Infra-Access variable group reference
- Add AzureCLI@2 step to acquire bearer token via WIF SC
- Set InsertAccessToken as secret variable from WIF token

Resolves: https://dev.azure.com/dnceng/internal/_workitems/edit/10091
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 5, 2026

✅ No release notes required

@github-project-automation github-project-automation Bot moved this from New to In Progress in F# Compiler and Tooling May 6, 2026
@T-Gro T-Gro enabled auto-merge (squash) May 6, 2026 12:17
@T-Gro T-Gro disabled auto-merge May 7, 2026 10:33
@T-Gro T-Gro merged commit ba48c78 into dotnet:main May 7, 2026
3 of 33 checks passed
T-Gro pushed a commit that referenced this pull request May 7, 2026
T-Gro added a commit that referenced this pull request May 12, 2026
…TOOLS_SOURCE override

Per Missy Messa's PR #19683 pattern: use WIF service connection
'dnceng-fsharp-vs-insertion-wif' to acquire DevDiv access token via AzureCLI@2.
Set token as VSS_NUGET_EXTERNAL_FEED_ENDPOINTS env var so NuGet restore
authenticates against devdiv/VS feed (where Roslyn 2.10.0-beta2-72429-17 lives).

Also override BUILDTOOLS_SOURCE env var so init-tools.cmd's project.json restore
of Microsoft.DotNet.BuildTools 1.0.27-prerelease-01001-04 finds it on
dnceng/myget-legacy mirror (the original dotnet.myget.org/F/dotnet-buildtools
URL is dead).

Drop Microsoft.FSharp.TupleSample 1.0.0-alpha-161121 from packages.config:
sample/test-only package (not in any production code path), only referenced from
tests/FSharp.Core.UnitTests/StructTuples.fs which is skipped in CI (PB_SKIPTESTS).
Originally on dotnet.myget.org/F/fsharp (dead).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants