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); }
public async Task Token() { var token = await GraphUtil.GetTokenFromGraphExplorer(); }
public async Task Token() { var token = await GraphUtil.GetTokenFromGraphExplorer(); Console.WriteLine(token); }