Microsoft.Legal.MatterCenter.Jobs.KeyVaultHelper.GetAccessToken C# (CSharp) 메소드

GetAccessToken() 공개 정적인 메소드

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
리턴 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;
        }