Microsoft Graph : 0-60 in 60 Minutes Ashish Trivedi Empired Ltd.
Ashish Trivedi O365, SharePoint & Office Dev Specialist Empired Ltd., Australia O365, SharePoint & Office Dev Specialist Office Development MVP Advisory member in MS Bootcamp Team Organiser of Melbourne O365 Meetup Organiser of Office 365 Dev Meetup (virtual) MCC, OSS Contributor Contact Details: Email : ashish@365share.info Twitter : @_AshishTrivedi FB: fb.me/O365DevBootcamp
Agenda What is Microsoft Graph? Common Challenges Getting started with Microsoft Graph? Intelligent applications using Microsoft Graph Summary
Microsoft Graph an unified REST API and comprehensive developer experience for integrating the data and intelligence exposed by Office 365 services.
1 App
Authentication
Permissions
Common Challenges ADAL vs MSAL
Common Challenges contd. REST API vs SDK User me = await graphClient.Me.Request().Select("mail,userPrincipalName").GetAsync(); return me.Mail ?? me.UserPrincipalName;
Common Challenges contd. using (var client = new HttpClient()) { using (var request = new HttpRequestMessage(HttpMethod.Get, endpoint + queryParameter)) request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json")); request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", accessToken); using (HttpResponseMessage response = await client.SendAsync(request)) if (response.StatusCode == HttpStatusCode.OK) var json = JObject.Parse(await response.Content.ReadAsStringAsync()); me.Address = !string.IsNullOrEmpty(json.GetValue("mail").ToString()) ? json.GetValue("mail").ToString() : json.GetValue("userPrincipalName").ToString(); } return me.Address?.Trim();
Common Challenges contd. Service API vs Microsoft Graph API
Demos https://graph.microsoft.com Graph Explorer Quick Start Application Templates ADAL quick start SDK & Tooling support
Intelligent Applications Examples – Delve My Analytics
Intelligent Applications Rich context Deep insights Real-time updates
Classwork What is Microsoft Graph? Getting started with Microsoft Graph? Common Challenges Intelligent applications using Microsoft Graph Summary
Homework Identify idea Select Platform Find your technology Build it