public async Task CanAuthenticateToServiceWithAADToken() { Func <Task <string> > tokenProvider = () => IntegrationTestCommon.GetAuthenticationTokenAsync("https://batch.core.windows.net/"); using (var client = BatchClient.Open(new BatchTokenCredentials(TestCommon.Configuration.BatchAccountUrl, tokenProvider))) { await client.JobOperations.ListJobs().ToListAsync(); } }
static Task <string> tokenProvider() => IntegrationTestCommon.GetAuthenticationTokenAsync("https://batch.core.windows.net/");