[CloudShell] Capture HTTPError 400 in Cloud Shell #14455
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This is temporary mitigation for #12757: Cloud Shell fails with
400 Client Errorfor non-supported resources/audiences/scopes, likehttps://ossrdbms-aad.database.windows.nethttps://digitaltwins.azure.netCurrently Azure CLI will show an ugly error message:
With this PR, an instruction is shown as a workaround:
However, this is only a temporarily fix. For long-term, Cloud Shell needs to remove the allowlist and make all resources/audiences/scopes available.
⚠ Side effect: This will hide intermittent 400 failures for supported resources (#11749) , such as
https://management.core.windows.net/. If the user follows the instruction to runaz loginas a workaround, the actual problem will be unreported. So I am not sure if this PR is a good choice.Testing Guide
In Cloud Shell, follow #13567 to install Python 3.8 and checkout Azure CLI from source code. Then run