public async void RetrieveMyInformation() { _me = await _officeGraphClient.GetMyInformationAsync(); if (_me != null) { AnnounceProperty("Me"); } }
public static async Task RunExamplesAsync() { IOfficeGraphClient officeGraphClient = CreateAndInializeOfficeGraphClient(); if (officeGraphClient == null) { System.Console.WriteLine("Unable to continue"); return; } var me = await officeGraphClient.GetMyInformationAsync(); System.Console.WriteLine($"Allright, {me.givenName}, let's do this!"); }