Azure / azure-iot-cli-extension

Azure IoT extension for Azure CLI
Other
83 stars 65 forks source link

Azure Digital Twins route setup fails #223

Closed gopimails closed 4 years ago

gopimails commented 4 years ago

This is autogenerated. Please review and update as needed.

Describe the bug

Command Name az dt route create Extension Name: azure-iot. Version: 0.9.6.

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 654, in execute
    raise ex
cli/core/commands/__init__.py, ln 718, in _run_jobs_serially
    results.append(self._run_job(expanded_arg, cmd_copy))
...
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:

Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information.

Expected Behavior

Environment Summary

Linux-4.15.0-1091-azure-x86_64-with-debian-stretch-sid (Cloud Shell)
Python 3.6.10
Installer: DEB

azure-cli 2.9.0 *

Extensions:
azure-iot 0.9.6

Additional Context

digimaun commented 4 years ago

Hey @gopimails thanks for submitting this issue. We are aware of this problem and working on a fix for the cloudshell environment. As a workaround to resolve this issue right now, (re)run az login and then the original command that failed.

If you are interested here is an ongoing issue thread related to the 400 client error for Cloudshell (not necessarily all with the same root cause) https://github.com/Azure/azure-cli/issues/11749

gopimails commented 4 years ago

It worked post az login and then the command. Thanks