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