Skip to content

Commit e78c9b4

Browse files
committed
Use AZURE_DEVOPS_EXT_PAT
1 parent b648499 commit e78c9b4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

scripts/azure-devops/convert_azurerm_service_connection_to_oidc.ps1

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,9 @@ if (!(az extension list --query "[?name=='azure-devops'].version" -o tsv)) {
8383
Write-Host "Adding Azure CLI extension 'azure-devops'..."
8484
az extension add -n azure-devops -y -o none
8585
}
86-
Write-Output $accessToken | az devops login --organization $OrganizationUrl
86+
# Write-Output $accessToken | az devops login --organization $OrganizationUrl
87+
$env:AZURE_DEVOPS_EXT_PAT = $accessToken
88+
az devops configure --defaults organization=$OrganizationUrl
8789
if ($lastexitcode -ne 0) {
8890
Write-Error "$($account.user.name) failed to log in to Azure DevOps organization '${OrganizationUrl}'"
8991
exit $lastexitcode

0 commit comments

Comments
 (0)