question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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:closed
  • Created a year ago
  • Comments:11 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
fbersoncommented, Apr 13, 2022

Using the retrieve-registration option fixed it for me!

1reaction
wangzelin007commented, Apr 6, 2022

any tip for that?

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.0 image image

And 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.0 image

Here is the latest doc for desktopvirtualization

Read more comments on GitHub >

github_iconTop Results From Across the Web

Use personal access tokens - Azure DevOps
Learn how to create and manage personal access tokens (PATs) as alternate passwords to authenticate to Azure DevOps.
Read more >
Sign in with a personal access token (PAT) - Azure
To create a PAT, see Use personal access tokens. To use a PAT with the Azure DevOps CLI, use one of these options:...
Read more >
Understand job access tokens - Azure Pipelines
A job access token is a security token that is dynamically generated by Azure Pipelines for each job at run time. The agent...
Read more >
Manage personal access tokens using API - Azure DevOps
In this article. Prerequisites; Authenticate with Azure Active Directory (Azure AD) tokens; Clone our Python Flask web app; Generate a ...
Read more >
Authorize access to REST APIs with OAuth 2.0
Category Scope Name Agent Pools vso.agentpools Agent Pools (read) vso.agentpools_manage Agent Pools (read, manage) vso.environment_manage Environment (read, manage)
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found