diff --git a/.NET Core/EncryptCredentials/EncryptCredentials/Services/AadService.cs b/.NET Core/EncryptCredentials/EncryptCredentials/Services/AadService.cs index 9518feb2..e4df12e3 100644 --- a/.NET Core/EncryptCredentials/EncryptCredentials/Services/AadService.cs +++ b/.NET Core/EncryptCredentials/EncryptCredentials/Services/AadService.cs @@ -57,10 +57,11 @@ public string GetAccessToken() // Create a confidential client to authorize the app with the AAD app IConfidentialClientApplication clientApp = ConfidentialClientApplicationBuilder - .Create(azureAd.Value.ClientId) - .WithClientSecret(azureAd.Value.ClientSecret) - .WithAuthority(tenantSpecificUrl) - .Build(); + .Create(azureAd.Value.ClientId) + .WithClientSecret(azureAd.Value.ClientSecret) + .WithAuthority(tenantSpecificUrl) + .Build(); + // Make a client call if Access token is not available in cache authenticationResult = clientApp.AcquireTokenForClient(azureAd.Value.ScopeBase).ExecuteAsync().Result; }