Bug using --identity without identity assigned to VM
- Dominant language
- Python
- Stars
- 4.6k
- Forks
- 3.5k
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 60
Description
### **This is autogenerated. Please review and update as needed.**
## Describe the bug
**Command Name**
`az login`
**Errors:**
```
The command failed with an unexpected error. Here is the traceback:
Traceback (most recent call last):
File "/usr/lib64/az/lib/python2.7/site-packages/knack/cli.py", line 206, in invoke
cmd_result = self.invocation.execute(args)
File "/usr/lib64/az/lib/python2.7/site-packages/azure/cli/core/commands/__init__.py", line 603, in execute
raise ex
HTTPError
```
## To Reproduce:
Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information.
- _Put any pre-requisite steps here..._
- `az login --identity`
Try to login with a VM and no identity you will get the above error.
## Expected Behavior
Catch this error and display a more meaningful error to the customer.
## Environment Summary
```
Linux-3.10.0-862.11.6.el7.x86_64-x86_64-with-centos-7.5.1804-Core
Python 2.7.5
Shell: bash
azure-cli 2.0.71
```
## Additional Context
Contributor guide
Assessment
This issue has not been assessed yet.