az desktopvirtualization doesn't show the generated token in Azure DevOps
See original GitHub issue
az feedback
auto-generates most of the information requested below, as of CLI version 2.0.62
Describe the bug
The bug is that this command line :
$token= $(az desktopvirtualization hostpool show --name "$($ExistingWVDHostPoolName)" --resource-group "$($ResourceGroupName)" --query registrationInfo.token -o tsv --debug)
Is no longer working in Azure DevOps
The result of $token is null, but until one week ago it was retrieving well the token.
To Reproduce You should only try it in Azure DevOps pipelines.
Expected behavior Save in the variable $token the generated token previously for the Hostpool in WVD service.
This $token will be used to add the windows virtual machine to the hostpool.
Environment summary Azure DevOps that executes an az cli powershell script
Additional context
The same command line is working well in Cloud Shell from the navigator in Azure and in my local computer, we are in version az cli 2.34.1. The version of azure cli is 2.21.0 * in self-host-agent.
Should it work in previous versions too?
Issue Analytics
- State:
- Created a year ago
- Comments:11 (3 by maintainers)
Top GitHub Comments
Using the retrieve-registration option fixed it for me!
Please use this command to retrieve token
$token= $(az desktopvirtualization hostpool retrieve-registration-token --name zelin63-hp --resource-group zelin63 --query token -o tsv)
in desktopvirtualization 0.2.0And you can still use
$token= $(az desktopvirtualization hostpool show --name zelin63-hp --resource-group zelin63 --query registrationInfo.token -o tsv --debug)
to retrieve token in desktopvirtualization 0.1.0Here is the latest doc for desktopvirtualization