Skip to content

Commit

Permalink
Fix tenant id & client id precedence. (#292)
Browse files Browse the repository at this point in the history
* Fix tenant id & client id precedence.
  • Loading branch information
calebkiage authored Nov 9, 2023
1 parent 0b5ddfe commit 9525811
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,10 @@ public EnvironmentCredential(string? tenantId, string? clientId, TokenCredential
{
_options = options ?? new TokenCredentialOptions();

tenantId ??= Environment.GetEnvironmentVariable(Utils.Constants.Environment.TenantId);
clientId ??= Environment.GetEnvironmentVariable(Utils.Constants.Environment.ClientId);
var tId = Environment.GetEnvironmentVariable(Utils.Constants.Environment.TenantId);
var cId = Environment.GetEnvironmentVariable(Utils.Constants.Environment.ClientId);
tenantId = string.IsNullOrEmpty(tId) ? tenantId : tId;
clientId = string.IsNullOrEmpty(cId) ? clientId : cId;
string? clientSecret = Environment.GetEnvironmentVariable(Utils.Constants.Environment.ClientSecret);
string? clientCertificatePath = Environment.GetEnvironmentVariable(Utils.Constants.Environment.ClientCertificatePath);
string? clientCertificatePassword = Environment.GetEnvironmentVariable(Utils.Constants.Environment.ClientCertificatePassword);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<!-- Recommended: Embed symbols containing Source Link in the main file (exe/dll) -->
<DebugType>embedded</DebugType>
<VersionPrefix>1.0.0</VersionPrefix>
<VersionSuffix>preview.8</VersionSuffix>
<VersionSuffix>preview.9</VersionSuffix>
<IsTrimmable>true</IsTrimmable>
</PropertyGroup>

Expand Down

0 comments on commit 9525811

Please sign in to comment.