Esempio n. 1
0
        async Task <GraphServiceClient> ProvideClient()
        {
            var token = await GraphUtil.GetTokenFromGraphExplorer();

            var client = new GraphServiceClient(
                new DelegateAuthenticationProvider(
                    async(requestMessage) =>
            {
                requestMessage.Headers.Authorization = new AuthenticationHeaderValue("bearer", token);
                await Task.CompletedTask;
            }));

            Me = client.Me.Request().GetAsync();
            return(client);
        }
Esempio n. 2
0
 public async Task Token()
 {
     var token = await GraphUtil.GetTokenFromGraphExplorer();
 }
Esempio n. 3
0
            public async Task Token()
            {
                var token = await GraphUtil.GetTokenFromGraphExplorer();

                Console.WriteLine(token);
            }