build: adjust for changes in the Az.Accounts module (#40001)

They made secure strings the default. Doing it this way maintains
compatibility with the version before and after the default changed.

This fixes symbol publication.
This commit is contained in:
Dustin L. Howett
2025-06-11 20:53:40 -05:00
committed by GitHub
parent 3f834d7a6b
commit 6e0f1819d5

View File

@@ -68,7 +68,7 @@ jobs:
pwsh: true
ScriptType: InlineScript
Inline: |-
$AzToken = (Get-AzAccessToken -ResourceUrl api://30471ccf-0966-45b9-a979-065dbedb24c1).Token
$AzToken = (Get-AzAccessToken -AsSecureString -ResourceUrl api://30471ccf-0966-45b9-a979-065dbedb24c1).Token | ConvertFrom-SecureString -AsPlainText
Write-Host "##vso[task.setvariable variable=SymbolAccessToken;issecret=true]$AzToken"