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
|
return &timeoutTokenCredential{cred: cred, timeout: config.AuthMSITimeout}, nil
|
||||||
|
|
||||||
case "cli":
|
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":
|
case "oidc":
|
||||||
err := checkOIDCConfig(config)
|
err := checkOIDCConfig(config)
|
||||||
|
|
Loading…
Reference in a new issue