Skip to content

Commit

Permalink
azuredns: use TenantID also for cli authentication (#2176)
Browse files Browse the repository at this point in the history
  • Loading branch information
orgads authored May 7, 2024
1 parent 983c181 commit 2ec9e42
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion providers/dns/azuredns/azuredns.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 2ec9e42

Please sign in to comment.