Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix tenant id & client id precedence. #292

Merged
merged 4 commits into from
Nov 9, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@
{
_options = options ?? new TokenCredentialOptions();

tenantId ??= Environment.GetEnvironmentVariable(Utils.Constants.Environment.TenantId);
clientId ??= Environment.GetEnvironmentVariable(Utils.Constants.Environment.ClientId);
tenantId = Environment.GetEnvironmentVariable(Utils.Constants.Environment.TenantId) ?? tenantId;
calebkiage marked this conversation as resolved.
Show resolved Hide resolved
clientId = Environment.GetEnvironmentVariable(Utils.Constants.Environment.ClientId) ?? clientId;
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 Expand Up @@ -98,7 +98,7 @@
/// <param name="requestContext">The details of the authentication request.</param>
/// <param name="cancellationToken">A <see cref="CancellationToken"/> controlling the request lifetime.</param>
/// <returns>An <see cref="AccessToken"/> which can be used to authenticate service client calls.</returns>
public override AccessToken GetToken(TokenRequestContext requestContext, CancellationToken cancellationToken = default)

Check warning on line 101 in src/Microsoft.Graph.Cli.Core/Authentication/EnvironmentCredential.cs

View workflow job for this annotation

GitHub Actions / Build

Remove the default parameter value to match the signature of overridden method. (https://rules.sonarsource.com/csharp/RSPEC-1006)
{
return GetCredentialOrFail().GetToken(requestContext, cancellationToken);
}
Expand All @@ -115,7 +115,7 @@
/// <param name="requestContext">The details of the authentication request.</param>
/// <param name="cancellationToken">A <see cref="CancellationToken"/> controlling the request lifetime.</param>
/// <returns>An <see cref="AccessToken"/> which can be used to authenticate service client calls, or a default <see cref="AccessToken"/>.</returns>
public override async ValueTask<AccessToken> GetTokenAsync(TokenRequestContext requestContext, CancellationToken cancellationToken = default)

Check warning on line 118 in src/Microsoft.Graph.Cli.Core/Authentication/EnvironmentCredential.cs

View workflow job for this annotation

GitHub Actions / Build

Remove the default parameter value to match the signature of overridden method. (https://rules.sonarsource.com/csharp/RSPEC-1006)
{
return await GetCredentialOrFail().GetTokenAsync(requestContext, cancellationToken).ConfigureAwait(false);
}
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>
</PropertyGroup>

<PropertyGroup>
Expand Down
Loading