Skip to content

Migrate dn-bot-devdiv-drop-rw-code-rw PAT to WIF service connection#15792

Open
missymessa wants to merge 1 commit into
microsoft:mainfrom
missymessa:dev/migrate-devdiv-drop-pat-to-wif
Open

Migrate dn-bot-devdiv-drop-rw-code-rw PAT to WIF service connection#15792
missymessa wants to merge 1 commit into
microsoft:mainfrom
missymessa:dev/migrate-devdiv-drop-pat-to-wif

Conversation

@missymessa
Copy link
Copy Markdown
Contributor

Summary

Replaces the \dn-bot-devdiv-drop-rw-code-rw\ PAT with a WIF-based service connection (\dnceng-devdiv-drop-rw-code-rw-wif) for DevDiv drop access.

Changes

  • Add AzureCLI@2 task in the Publish job to acquire an Entra token via the WIF service connection before the MicroBuildVstsDrop task
  • *Set _DevDivDropAccessToken* at runtime using the WIF-acquired token instead of the static PAT from \DotNet-VSTS-Infra-Access\ variable group
  • Remove static PAT variable reference from the variable declarations

Context

This is part of the PAT-to-Entra migration tracked by AB#10146. The WIF service connection \dnceng-devdiv-drop-rw-code-rw-wif\ (backed by app registration \dnceng-devdiv-drop-rw-code-rw-wif, App ID: \7106a410-fbcb-4750-a202-879077f925ec) was previously created and verified. The same pattern was successfully deployed in dotnet/fsharp#19598.

Validation

Note: PR validation pipelines read YAML from \main, not the PR branch. The actual WIF migration will be validated on the first post-merge CI build.

Replace the dn-bot-devdiv-drop-rw-code-rw PAT with a WIF-based
service connection (dnceng-devdiv-drop-rw-code-rw-wif) for DevDiv
drop access.

- Add AzureCLI@2 task to acquire an Entra token via the WIF SC
- Set _DevDivDropAccessToken at runtime via the WIF token
- Remove static PAT variable reference from DotNet-VSTS-Infra-Access
Copilot AI review requested due to automatic review settings May 15, 2026 21:48
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR migrates DevDiv drop publishing in the official Azure Pipelines build from a static PAT (dn-bot-devdiv-drop-rw-code-rw) to a WIF-based service connection, acquiring an Entra ID access token at runtime before the VSTS drop upload task.

Changes:

  • Replaced the _DevDivDropAccessToken variable’s static PAT value with an empty placeholder to be populated at runtime.
  • Added an AzureCLI@2 step in the Publish job to acquire an Azure DevOps access token via the dnceng-devdiv-drop-rw-code-rw-wif service connection.
  • Continued passing _DevDivDropAccessToken into 1ES.MicroBuildVstsDrop@1 for drop upload, now sourced from the WIF-acquired token.

Comment on lines 95 to +100
- group: DotNet-Symbol-Server-Pats
# Group gives access to $dn-bot-devdiv-drop-rw-code-rw and dn-bot-dnceng-build-rw-code-rw
- group: DotNet-VSTS-Infra-Access
# DevDiv drop access token is acquired via WIF service connection (dnceng-devdiv-drop-rw-code-rw-wif)
- name: _DevDivDropAccessToken
value: $(dn-bot-devdiv-drop-rw-code-rw)
value: ''
scriptType: pscore
scriptLocation: inlineScript
inlineScript: |
$token = az account get-access-token --resource 499b84ac-1321-427f-aa17-267ca6975798 --query accessToken -o tsv
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.

2 participants