示例#1
0
        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();
            }
        }
示例#2
0
 static Task <string> tokenProvider() => IntegrationTestCommon.GetAuthenticationTokenAsync("https://batch.core.windows.net/");