azuredns: use TenantID also for cli authentication (#2176)
This commit is contained in:
parent
983c181e45
commit
2ec9e42ee3
1 changed files with 5 additions and 1 deletions
|
@ -213,7 +213,11 @@ func getCredentials(config *Config) (azcore.TokenCredential, error) {
|
|||
return &timeoutTokenCredential{cred: cred, timeout: config.AuthMSITimeout}, nil
|
||||
|
||||
case "cli":
|
||||
return azidentity.NewAzureCLICredential(nil)
|
||||
var credOptions *azidentity.AzureCLICredentialOptions
|
||||
if config.TenantID != "" {
|
||||
credOptions = &azidentity.AzureCLICredentialOptions{TenantID: config.TenantID}
|
||||
}
|
||||
return azidentity.NewAzureCLICredential(credOptions)
|
||||
|
||||
case "oidc":
|
||||
err := checkOIDCConfig(config)
|
||||
|
|
Loading…
Reference in a new issue