-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
az role assignment create fails in Cloud Shell: 400 Client Error: Bad Request for url: http://localhost:50342/oauth2/token #9345
Comments
This is a cloud shell bug, that the token endpoint stops to respond. Can you try again? |
@yugangw-msft Mine fails as well, though for a different reason. When I run:
I get this error (I've removed the PII):
When attempting the same operation with the same login credentials through the portal, this operation does work. |
@jmwoloso, if you run CLI from your desktop (instead of cloud shell), does it work? |
Could you run again to see if it is working? If not, please run with |
Seems to be Cloud Shell issue and we are working on it. Please use |
Can we close this issue? |
Closing due to no response. If the issue happens again, please reply to this issue or create a new one. |
I'm getting this error via the Azure Cloud Shell from MS Terminal (Preview). I've been running lots of other 'create' scripts on other services with no problem so I'm logged in. I've rebooted and returned to terminal's shell as a first stop and still get same error. Running az keyvault list --resource-group myRg will return an existing KeyVault but the create statement tossed the error. After posting this I opened the online cloud shell editor and ran the same command. This time the editor window replied back with validation error: Parameter 'vault_name' must conform to the following pattern: '^[a-zA-Z0-9-]{3,24}$'. I shortened the name and tried again from Terminal's shell and things worked. SUMMARY: The portal's integrated Cloud Shell produced a meaningful error message (--name was too long) while the shell via MS Terminal produced the non-helpful 400 Client Error message. |
I had the same error but found there was a spelling mistake in my command on AZ CLI. It was working after correcting the spelling. I hope this is helpful to someone. |
Hi @justSteve, the 400 error you got is from Cloud Shell itself, instead of the |
per my experience, git hub forms are not informative. try stockoverflow |
@kaukin, we are the developers of Azure CLI. 😉 GitHub Issues page is currently the only forum we monitor. We don't usually work on stackoverflow. |
Describe the bug
Running in CloudShell , command fails, works correctly on client.
Command Name
az role assignment create
Errors:
To Reproduce:
Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information.
az role assignment create --assignee {} --role {} --scope {}
Expected Behavior
Environment Summary
Additional Context
Thanks for your feedback!
command ran in 4.050 seconds.
The text was updated successfully, but these errors were encountered: