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.

Listing VMs causes bad HTTP request in Windows Terminal

See original GitHub issue

Describe the bug

Command Name az vm list

Errors:

400 Client Error: Bad Request for url: http://localhost:50342/oauth2/token
Traceback (most recent call last):
python3.6/site-packages/knack/cli.py, ln 215, in invoke
    cmd_result = self.invocation.execute(args)
cli/core/commands/__init__.py, ln 631, in execute
    raise ex
cli/core/commands/__init__.py, ln 695, in _run_jobs_serially
    results.append(self._run_job(expanded_arg, cmd_copy))
cli/core/commands/__init__.py, ln 688, in _run_job
    six.reraise(*sys.exc_info())
...
python3.6/site-packages/msrestazure/azure_active_directory.py, ln 486, in get_msi_token
    result.raise_for_status()
python3.6/site-packages/requests/models.py, ln 940, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: http://localhost:50342/oauth2/token

To Reproduce:

  • Connect to Azure Cloud Shell in Windows Terminal
  • az vm list

A similar error will occur with az group list. However, no problems occur when running these commands through the browser shell.

Expected Behavior

Environment Summary

Linux-4.15.0-1082-azure-x86_64-with-debian-stretch-sid
Python 3.6.5
Installer: DEB

azure-cli 2.5.1 *

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
maertendMSFTcommented, Jul 7, 2020

This should be fixed now. I cannot repro, please close.

0reactions
yungezzcommented, May 29, 2020

hi @cnasman-iivi this is a known Cloudshell issue, pls see detail in #11749. To workaround it pls try az login.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Tips for using the Azure CLI successfully - Microsoft Learn
Learn tips for using Azure CLI successfully, such as output formats, passing parameter values, and quoting rules for different shells.
Read more >
The WinRM client received an HTTP bad request status (400)
When configuring WinRM on servers in the Active Directory domain, I have faced a strange problem. After WinRM service is configured and ...
Read more >
How do I get the body of a web request that returned 400 Bad ...
There is a known issue with PowerShell Invoke-WebRequest and Invoke-RestMethod where the shell eats the response body when the status code is an...
Read more >
Windows Admin Center - WinRM bad request
I'm able to add all of our Hyper V Hosts. However , I get the same error as above when accessing the Windows...
Read more >
VMware Workstation Pro 16.0
Changing the Virtual Machine Working Directory 301. Configuring Power Settings for a Virtual ... Run the Support Script from a Windows Command Prompt...
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