Azure / azure-cli

Azure Command-Line Interface
MIT License
4.03k stars 3.01k forks source link

az login of service-principal fails with invalid_client #17918

Open swethmandava opened 3 years ago

swethmandava commented 3 years ago

Describe the bug

Command Name az login

Errors:

Get Token request returned http error: 401 and server response: {"error":"invalid_client","error_description":"AADSTS7000215: Invalid client secret is provided.\r\nTrace ID: 0aaeeb7f-4f1f-4acc-a838-1e076b6f0600\r\nCorrelation ID: ea41acb9-7f3e-4278-aa69-6ef7336d534d\r\nTimestamp: 2021-04-29 01:35:31Z","error_codes":[7000215],"timestamp":"2021-04-29 01:35:31Z","trace_id":"0aaeeb7f-4f1f-4acc-a838-1e076b6f0600","correlation_id":"ea41acb9-7f3e-4278-aa69-6ef7336d534d","error_uri":"https://login.microsoftonline.com/error?code=7000215"}

To Reproduce:

Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information.

Environment summary

macOS-11.2.3-x86_64-i386-64bit
Python 3.8.9
Installer: HOMEBREW

azure-cli 2.22.1

Additional context I'm trying to access azure keyvault from github actions but unable to do so.

Created the service portal using the guidelines provided here. Are username and clientId as well as password and clientSecret synonymous?

Relevant bug https://github.com/Azure/login/issues/107

yonzhan commented 3 years ago

@jiasli for awareness