Azure / Azure/azure-cli-extensions

401 Error on a Container App in certain Resource Group

Open
#9,397 5 comments 0 reactions 0 assignees View on GitHub
Auto-Assign ContainerApp customer-reported question Service Attention
Dominant language
Python
Stars
454
Forks
1.7k
Avg merge
2d 19h
Merged PRs (30d)
64

Description

### **This is autogenerated. Please review and update as needed.**

## Describe the bug

**Command Name**
`az containerapp exec
Extension Name: containerapp. Version: 0.3.42.`

**Errors:**
```
The command failed with an unexpected error. Here is the traceback:
Handshake status 401 Unauthorized
Traceback (most recent call last):
File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\knack/cli.py", line 233, in invoke
File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 663, in execute
File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 726, in _run_jobs_serially
File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 697, in _run_job
File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 333, in __call__
File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/command_operation.py", line 121, in handler
File "C:\Users\andejoh06\.azure\cliextensions\containerapp\azext_containerapp\custom.py", line 3403, in containerapp_ssh
conn = WebSocketConnection(cmd=cmd, resource_group_name=resource_group_name, name=name, revision=revision,
File "C:\Users\andejoh06\.azure\cliextensions\containerapp\azext_containerapp\_ssh_utils.py", line 62, in __init__
self._socket.connect(self._url, header=[f"Authorization: Bearer {self._token}"])
File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\websocket/_core.py", line 253, in connect
File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\websocket/_handshake.py", line 57, in handshake
File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\websocket/_handshake.py", line 148, in _get_resp_headers
websocket._exceptions.WebSocketBadStatusException: Handshake status 401 Unauthorized
```

## 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 containerapp exec -n {} -g {} --container {} --command {}`

## Expected Behavior

## Environment Summary
```
Windows-10-10.0.26100-SP0
Python 3.10.10
Installer: MSI

azure-cli 2.48.1 *

Extensions:
containerapp 0.3.42

Dependencies:
msal 1.20.0
azure-mgmt-resource 22.0.0
```
## Additional Context

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.