unable to create Authorizer configured from Azure CLI 2.0 for local development scenarios.
- 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 account get-access-token`
**Errors:**
```
The command failed with an unexpected error. Here is the traceback:
[Errno 2] No such file or directory: 'tmpabur3kim.pem'
Traceback (most recent call last):
File "/usr/local/Cellar/azure-cli/2.31.0/libexec/lib/python3.10/site-packages/knack/cli.py", line 231, in invoke
cmd_result = self.invocation.execute(args)
File "/usr/local/Cellar/azure-cli/2.31.0/libexec/lib/python3.10/site-packages/azure/cli/core/commands/__init__.py", line 658, in execute
raise ex
File "/usr/local/Cellar/azure-cli/2.31.0/libexec/lib/python3.10/site-packages/azure/cli/core/commands/__init__.py", line 721, in _run_jobs_serially
results.append(self._run_job(expanded_arg, cmd_copy))
File "/usr/local/Cellar/azure-cli/2.31.0/libexec/lib/python3.10/site-packages/azure/cli/core/commands/__init__.py", line 692, in _run_job
result = cmd_copy(params)
File "/usr/local/Cellar/azure-cli/2.31.0/libexec/lib/python3.10/site-packages/azure/cli/core/commands/__init__.py", line 328, in __call__
return self.handler(*args, **kwargs)
File "/usr/local/Cellar/azure-cli/2.31.0/libexec/lib/python3.10/site-packages/azure/cli/core/commands/command_operation.py", line 121, in handler
return op(**command_args)
File "/usr/local/Cellar/azure-cli/2.31.0/libexec/lib/python3.10/site-packages/azure/cli/command_modules/profile/custom.py", line 76, in get_access_token
creds, subscription, tenant = profile.get_raw_token(subscription=subscription, resource=resource, scopes=scopes,
File "/usr/local/Cellar/azure-cli/2.31.0/libexec/lib/python3.10/site-packages/azure/cli/core/_profile.py", line 383, in get_raw_token
credential = self._create_credential(account, tenant)
File "/usr/local/Cellar/azure-cli/2.31.0/libexec/lib/python3.10/site-packages/azure/cli/core/_profile.py", line 597, in _create_credential
return identity.get_service_principal_credential(username_or_sp_id)
File "/usr/local/Cellar/azure-cli/2.31.0/libexec/lib/python3.10/site-packages/azure/cli/core/auth/identity.py", line 213, in get_service_principal_credential
sp_auth = ServicePrincipalAuth(entry)
File "/usr/local/Cellar/azure-cli/2.31.0/libexec/lib/python3.10/site-packages/azure/cli/core/auth/identity.py", line 233, in __init__
with open(self.certificate, 'r') as file_reader:
FileNotFoundError: [Errno 2] No such file or directory: 'tmpabur3kim.pem'
```
## 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 account get-access-token -o {} --resource {}`
## Expected Behavior
## Environment Summary
```
macOS-11.6-x86_64-i386-64bit, Darwin 20.6.0
Python 3.10.0
Installer: HOMEBREW
azure-cli 2.31.0
```
## Additional Context
Contributor guide
Assessment
This issue has not been assessed yet.