Skip to content

Commit

Permalink
Eliminate some hardcoding
Browse files Browse the repository at this point in the history
  • Loading branch information
garath committed Mar 1, 2024
1 parent c411d0a commit d655bb8
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using System.Threading.Tasks;
using Azure.Core;
using Azure.Identity;
using Microsoft.DncEng.Configuration.Extensions;

namespace Microsoft.DncEng.SecretManager;

Expand All @@ -11,8 +12,8 @@ public sealed class SecretManagerCredentialProvider : ITokenCredentialProvider
// Use InteractiveBrowserCredential as a fallback for local dev environments.
private readonly Lazy<TokenCredential> _credential = new(() =>
new ChainedTokenCredential(
new AzureCliCredential(new AzureCliCredentialOptions { TenantId = "72f988bf-86f1-41af-91ab-2d7cd011db47" }),
new InteractiveBrowserCredential(new InteractiveBrowserCredentialOptions() { TenantId = "72f988bf-86f1-41af-91ab-2d7cd011db47" })
new AzureCliCredential(new AzureCliCredentialOptions { TenantId = ConfigurationConstants.MsftAdTenantId }),
new InteractiveBrowserCredential(new InteractiveBrowserCredentialOptions() { TenantId = ConfigurationConstants.MsftAdTenantId })
));

public Task<TokenCredential> GetCredentialAsync()
Expand Down

0 comments on commit d655bb8

Please sign in to comment.