Microsoft.Legal.MatterCenter.Jobs.KeyVaultHelper.GetAccessToken C# (CSharp) Method

GetAccessToken() public static method

Uses the ClientId and Screet to get an AD tokenok
public static GetAccessToken ( string authority, string resource, string scope ) : Task
authority string
resource string
scope string
return Task
        public static async Task<string> GetAccessToken(string authority, string resource, string scope)
        {
            var context = new AuthenticationContext(authority, TokenCache.DefaultShared);
            var result = await context.AcquireTokenAsync(resource, AssertionCert);
            return result.AccessToken;
        }