예제 #1
0
파일: People.cs 프로젝트: sidiandi/hagen
        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);
        }
예제 #2
0
 public async Task Token()
 {
     var token = await GraphUtil.GetTokenFromGraphExplorer();
 }
예제 #3
0
파일: GraphUtil.cs 프로젝트: sidiandi/hagen
            public async Task Token()
            {
                var token = await GraphUtil.GetTokenFromGraphExplorer();

                Console.WriteLine(token);
            }