diff --git a/sdk/mgmtcommon/AppAuthentication/Azure.Services.AppAuthentication/AzureServiceTokenProvider.cs b/sdk/mgmtcommon/AppAuthentication/Azure.Services.AppAuthentication/AzureServiceTokenProvider.cs index fdfd285d3c70..7731aaa4a5f4 100644 --- a/sdk/mgmtcommon/AppAuthentication/Azure.Services.AppAuthentication/AzureServiceTokenProvider.cs +++ b/sdk/mgmtcommon/AppAuthentication/Azure.Services.AppAuthentication/AzureServiceTokenProvider.cs @@ -248,9 +248,9 @@ private List GetTokenProviders() return authResult.AccessToken; } - public async Task GetAccessTokenAsync(string resource, string tenantId) + public Task GetAccessTokenAsync(string resource, string tenantId) { - return await GetAccessTokenAsync(resource, tenantId, default(CancellationToken)).ConfigureAwait(false); + return GetAccessTokenAsync(resource, tenantId, default(CancellationToken)); } /// @@ -267,7 +267,7 @@ public async Task GetAccessTokenAsync(string resource, string tenantId) /// Access token /// Thrown if resource is null or empty. /// Thrown if access token cannot be acquired. - public async Task GetAuthenticationResultAsync(string resource, string tenantId = default(string), + public Task GetAuthenticationResultAsync(string resource, string tenantId = default(string), CancellationToken cancellationToken = default(CancellationToken)) { if (string.IsNullOrWhiteSpace(resource)) @@ -277,12 +277,12 @@ public async Task GetAccessTokenAsync(string resource, string tenantId) string authority = string.IsNullOrEmpty(tenantId) ? string.Empty : $"{_azureAdInstance}{tenantId}"; - return await GetAuthResultAsyncImpl(resource, authority, cancellationToken).ConfigureAwait(false); + return GetAuthResultAsyncImpl(resource, authority, cancellationToken); } - public async Task GetAuthenticationResultAsync(string resource, string tenantId) + public Task GetAuthenticationResultAsync(string resource, string tenantId) { - return await GetAuthenticationResultAsync(resource, tenantId, default(CancellationToken)).ConfigureAwait(false); + return GetAuthenticationResultAsync(resource, tenantId, default(CancellationToken)); } } }