You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the az login was done with a certificate, the az acr login fails.
Steps to reproduce:
Login with certificate az login --service-principal -u http://<service principal> -p <certificate>.pem --tenant <tenant>
Login to ACR az acr login -n <registry>
The following error is shown:
'accessToken'
Traceback (most recent call last):
File "/usr/lib64/az/lib/python2.7/site-packages/knack/cli.py", line 197, in invoke
cmd_result = self.invocation.execute(args)
File "/usr/lib64/az/lib/python2.7/site-packages/azure/cli/core/commands/__init__.py", line 347, in execute
six.reraise(*sys.exc_info())
File "/usr/lib64/az/lib/python2.7/site-packages/azure/cli/core/commands/__init__.py", line 319, in execute
result = cmd(params)
File "/usr/lib64/az/lib/python2.7/site-packages/azure/cli/core/commands/__init__.py", line 180, in __call__
return super(AzCliCommand, self).__call__(*args, **kwargs)
File "/usr/lib64/az/lib/python2.7/site-packages/knack/commands.py", line 109, in __call__
return self.handler(*args, **kwargs)
File "/usr/lib64/az/lib/python2.7/site-packages/azure/cli/core/__init__.py", line 420, in default_command_handler
result = op(**command_args)
File "/usr/lib64/az/lib/python2.7/site-packages/azure/cli/command_modules/acr/custom.py", line 192, in acr_login
password=password)
File "/usr/lib64/az/lib/python2.7/site-packages/azure/cli/command_modules/acr/_docker_utils.py", line 197, in get_login_credentials
only_refresh_token=True)
File "/usr/lib64/az/lib/python2.7/site-packages/azure/cli/command_modules/acr/_docker_utils.py", line 154, in _get_credentials
password = _get_aad_token(cli_ctx, login_server, only_refresh_token, repository, permission)
File "/usr/lib64/az/lib/python2.7/site-packages/azure/cli/command_modules/acr/_docker_utils.py", line 59, in _get_aad_token
sp_id, refresh, access, tenant = profile.get_refresh_token()
File "/usr/lib64/az/lib/python2.7/site-packages/azure/cli/core/_profile.py", line 470, in get_refresh_token
sp_secret = self._creds_cache.retrieve_secret_of_service_principal(username_or_sp_id)
File "/usr/lib64/az/lib/python2.7/site-packages/azure/cli/core/_profile.py", line 804, in retrieve_secret_of_service_principal
return cred[_ACCESS_TOKEN]
KeyError: 'accessToken'
Environment summary
azure-cli (2.0.30)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-14)]
Python (Linux) 2.7.5 (default, May 3 2017, 07:55:04)
The text was updated successfully, but these errors were encountered:
@djyou, i am fixing the crash here. At the same time I don't think ACR is supporting SPs with certificate after cross checked the payload content. So I am leaving this issue open for you to wire up the support at your end. Feel free to let me know if you need details of how to acquire tokens using certificates
When the az login was done with a certificate, the az acr login fails.
Steps to reproduce:
Login with certificate
az login --service-principal -u http://<service principal> -p <certificate>.pem --tenant <tenant>
Login to ACR
az acr login -n <registry>
The following error is shown:
Environment summary
azure-cli (2.0.30)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-14)]
Python (Linux) 2.7.5 (default, May 3 2017, 07:55:04)
The text was updated successfully, but these errors were encountered: