Presentation is loading. Please wait.

Presentation is loading. Please wait.

Dive into the Power of the Microsoft Graph

Similar presentations


Presentation on theme: "Dive into the Power of the Microsoft Graph"— Presentation transcript:

1 Dive into the Power of the Microsoft Graph
Toni Pohl atwork.at

2 Dive into the Power of the Microsoft Graph What’s now and what’s new in GA and Preview Line-of-business app viewpoint on Microsoft Graph Code and demos

3 Toni Pohl atwork.at I work as consultant and I am book author, conference speaker, blogger at blog.atwork.at, IT-geek, community-guy, Vespa-fan, scuba diver, travel-addicted, and a Microsoft MVP. Contact details Twitter

4 Agenda Overview – Why and How-To Demos Line of Business App demo News

5 Various API styles and endpoints
Microsoft 2016 9/16/2018 4:38 AM Various API styles and endpoints Azure Active Directory Graph API SharePoint User Profile API Exchange HD Picture API Outlook REST API Office Graph in SharePoint Online OneDrive for Business API /jean_contoso_com/_api/v2.0/drive /designCouncil/_api/v2./drive OneDrive API Windows Live Profile API © 2016 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

6 - User, group and organizational
Data - User, group and organizational Microsoft Teams API - preview Project Rome API - preview SharePoint Sites API – GA OneNote API – GA Planner API – GA One endpoint One token All users Your app Users Groups Outlook Calendar SharePoint Excel Intune Teams Azure AD OneNote Planner

7 Demo: Using Microsoft Graph developer.microsoft.com
Microsoft Build 2017 9/16/2018 4:38 AM Demo: Using Microsoft Graph developer.microsoft.com © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

8 Calling the API https://graph.microsoft.com /{version} /{resource}
Build 2015 9/16/2018 4:38 AM Calling the API /{version} /{resource} /{id} /{property} ?{query-parameters} HTTP verbs dictate the request intent: GET | POST | PATCH | PUT | DELETE Version: /v1.0 or /beta Resource: /users, /groups, /sites, /drives, /devices, more… Member from collection: /users/AAA Property: /users/AAA/department Traverse to related resources via navigations: /users/AAA/events Query parameters: /users/AAA/events?$top=5 Format results: $select | $orderby Control results: $filter | $expand Paging: $top | $skip | $skiptoken © 2015 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

9 With Microsoft Graph Get the user profile JeanLuc Admiral Groups Riker
Microsoft Build 2017 9/16/2018 4:38 AM GET: /users/JeanLuc { "displayName": "JeanLuc Picard", "jobTitle": “Captain", } GET: /users/JeanLuc/photo/… {} GET: /users/JeanLuc/manager {"displayName": "Starfleet Admiral", …} GET: /users/JeanLuc/directReports "value" : [ {"displayName": "Riker", …}, {"displayName": "Worf", …}, ] GET: /me/memberOf/… {"displayName": "Starfleet engineering", …}, {"displayName": "Beaming", …}, With Microsoft Graph Get the user profile Admiral manager Groups memberOf JeanLuc Riker Worf Data directReports © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

10 Microsoft Build 2017 9/16/2018 4:38 AM GET /me/drive/root/… "value" : [ {"name": "proposal.pptx",… }, {"name": "forecast.xlsx",… } ] GET /drives/items/{id}/workbook GET /me/messages GET /me/events GET /me/contacts GET /me/onenote/notebooks GET /me/planner/tasks GET /me/devices GET /sites:/teams/opg:/ GET /sites:/teams/opg:/lists GET /groups/{id}/conversations ` With Microsoft Graph Get content for , calendar, files, tasks, sites, notes & more Documents Calendar Sites Tasks Meetings Contacts © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

11 With Microsoft Graph Get insights based on activities Out of office
Microsoft Build 2017 9/16/2018 4:38 AM GET /me/insights/trending "value" : [ {"name": "presentation.pptx", …}, {"name": "forecast.xlsx", …} ] GET /me/drive/recent {"name": "guidelines.pptx", …}, {"name": "budget.xlsx", …} GET people/?$search="topic: planning" {"displayName": "Data", …}, {"displayName": "Worf", …}, POST: /me/findMeetingTimes { "attendees": [ "type": "required", " Address": { "address": } ], "meetingDuration": "2h" With Microsoft Graph Get insights based on activities Out of office Trending Documents Find me the best time to meet Ana Search people based on topics People I’m working with Recent Documents © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

12 Have you been using other API’s before?
Microsoft Ignite 2016 9/16/2018 4:38 AM Have you been using other API’s before? © 2016 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

13 Azure AD Graph API = Graph API
>>> Use Graph API

14 Graph API = Outlook API >>> Use Graph API
Microsoft 2016 9/16/2018 4:38 AM Graph API = Outlook API >>> Use Graph API Synchronization supports the query expressions $select, $top, $expand. There is limited support for $filter and $orderby, and no support for $search. The only supported $filter expresssions are “$filter=ReceivedDateTime+ge+{value}” or “$filter=ReceivedDateTime+gt+{value}". The only supported $orderby expression is “$orderby=ReceivedDateTime+desc”. If you do not include an $orderby expression, the return order is not guaranteed. See OData query parameters for filtering, sorting, and paging parameters. © 2016 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

15 Graph API = Office 365 API >>> Use Graph API
Microsoft 2016 9/16/2018 4:38 AM Graph API = Office 365 API >>> Use Graph API © 2016 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

16 New Capabilities Traversal of relationships Query parameters
Microsoft Build 2017 9/16/2018 4:38 AM New Capabilities Traversal of relationships Query parameters Batching - preview Notifications - users & groups - preview Track changes - GA Extensions - GA © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

17 Microsoft Build 2017 9/16/2018 4:38 AM Batching POST /$batch { "requests": [{ "id": "1", "url": "/me/drive/root/children",    "method": "POST",    "body": {     "name": "folder1",     "folder": {}    },    "headers": {     "content-type": "application/json"    }   }, {    "id": "2",    "url": "/me/drive/root/children/folder1",    "method": "GET",    "dependsOn": ["1"] }, { "id": "3", "method": "GET", "url": "/me/planner/tasks" "id": "4", "url": "/groups/{id}/events" }  ] With Microsoft Graph Use $batch to combine multiple requests in one call Documents Calendar Sites Tasks Meetings Contacts © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

18 With Microsoft Graph Get notifications & track changes Edited a file
GET/me/mailFolders/{id}/messages/delta "value" : […] POST /subscriptions { "changeType": "created,updated", "notificationUrl": " "resource": "/me/mailfolders('AA')/messages", } GET/me/mailFolders/{id}/messages/delta ?$deltatoken=BB" With Microsoft Graph Get notifications & track changes Edited a file Scheduled a new meeting Got a new hire Added a new member to a group Got high important

19 Extending the Graph Add extensions to user, group, mail & more
Open Extensions GET /me/message/<id>/?$expand=extensions { "displayName": “JeanLuc", "extensions": [ "extensionName": "Com.Contoso.Referral", "companyName": "atwork", "expirationDate": " T11", "dealValue": 10,000 } ] Schema extensions POST /schemaExtensions "id": "training_courses", "targetTypes": [ "Group" ], "properties": [ "name": "courseName", "type": "String" }… GET /groups?$filter=courses/name eq Math101 Extending the Graph Add extensions to user, group, mail & more Customer referral Group: Math 101 Carlo’s son: Johnny Favorite color: blue

20 Project ROME

21

22

23

24

25

26 Quick Start Microsoft Build 2017 9/16/2018 4:38 AM
© Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

27 Get started! https://developer.microsoft.com/graph - try it out
– register you app

28 Visual Studio Integration
Microsoft Build 2017 9/16/2018 4:38 AM Visual Studio Integration © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

29 SDKs, samples and tooling
Microsoft Tech Summit FY17 9/16/2018 4:38 AM SDKs, samples and tooling PREVIEW GA* GA GA GA ASP.NET MVC JavaScript Angular PHP Python PREVIEW PREVIEW GA* GA* GA* Xamarin UWP Android iOS Ruby UPDATED VS integration © 2016 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

30 (Serverless) Line-of-Business Apps
Microsoft Build 2017 9/16/2018 4:38 AM (Serverless) Line-of-Business Apps © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

31 Graph News Microsoft Build 2017 9/16/2018 4:38 AM
© Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

32 Microsoft Graph Data Generally Available ( v1.0 ) Preview ( beta )
Microsoft Build 2017 9/16/2018 4:38 AM Microsoft Graph Data Generally Available ( v1.0 ) Preview ( beta ) Azure Active Directory Outlook mail, calendar and contacts Office 365 groups and conversations OneDrive drives and files Excel Planner  OneNote  SharePoint Sites People Microsoft Teams Insights (powering Delve)* SharePoint Lists Outlook Tasks Intune Office 365 Reporting AD Administrative Units Project Rome © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

33 Microsoft Graph Capabilities Generally Available ( v1.0 )
Microsoft Build 2017 9/16/2018 4:38 AM Microsoft Graph Capabilities Generally Available ( v1.0 ) Preview ( beta ) Webhooks for OneDrive and Outlook Delta query for OneDrive SDKs for .Net/Xamarin and Android SDKs for JS/Node and PHP  AppOnly webhooks for Outlook Delta query for AAD and Outlook  Extend Graph with your own data SDKs for iOS, Python, Ruby Hybrid on-premise support for Outlook (config wizard support) Webhooks for users and groups Webhooks for Outlook consumer Delta query scoping filter for AAD Batching Microsoft Graph is available in every Office 365 and Azure region and complies with sovereign/national cloud data requirements © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

34 SharePoint functions

35 Provisioning Sites with CSOM
9/16/2018 4:38 AM Provisioning Sites with CSOM var tenant = new Tenant(clientContext); var spoOperation = tenant.CreateSite(new SiteCreationProperties { Url =" Owner = Template = "BLANKINTERNETCONTAINER#0", Title = "Contoso Property Management Dashboard", StorageMaximumLevel = 1000, StorageWarningLevel = 750, TimeZoneId = 7, UserCodeMaximumLevel = 550, UserCodeWarningLevel = 500 }); clientContext.Load(spoOperation); clientContext.ExecuteQuery(); CSOM is around since long time. Until now… © 2014 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

36 Provisioning Groups with Graph
9/16/2018 4:38 AM Provisioning Groups with Graph var g = new Group { DisplayName = "My Group", MailNickname = "MyGroup", SecurityEnabled = false, MailEnabled = true, Description = "A nice group", GroupTypes = new[] { "Unified" }, }; g = await graphService.Groups.Request().AddAsync(g); Less complex, cleaner, more modern with the Graph. One simple call. Graph Service.do something. With the group, make a request – type safe wrapper (will be translated to http put or delete… depending on the operation) Wrapper (SDK) can significantly reduce code. © 2014 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

37 Read data from existing SharePoint site
9/16/2018 4:38 AM Read data from existing SharePoint site GET {siteId}/lists/{listId}/items?expand=columnSet { "value":[ { "createdBy": { "user" : {"id":"d54e4cdd-d2ca-4c39-bfa bca12f0","displayName":"John"}}, "createdDateTime":" T08:16:21Z", "eTag":"1610ac6a-24f e5977c63caa,1", "id":"1610ac6a-24f e5977c63caa", "lastModifiedBy":{"user":{"id":"d54e4cdd-d2ca-4c39-bfa bca12f0","displayName":"John"}}, "lastModifiedDateTime":" T08:16:21Z", "webUrl":" "listItemId":1, "columnSet":{ "Title":"Project Upgrade: Use the Microsoft Graph", "Description":"Set up group for new technologies.", "id":"1", ... } }]} No SDKs for SP operations © 2014 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

38 Planner and Excel functions

39 Create a plan for new employee tasks
9/16/2018 4:38 AM Create a plan for new employee tasks POST { "title" : "My plan with Bob", "owner" : "<groupIdGuid>" } POST "name" : "Urgent", "planId" : "<planId>" // From response to previous call © 2014 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

40 OneDrive + Excel Services
9/16/2018 4:38 AM OneDrive + Excel Services GET root/search(q='.xlsx')?select=name,id,webUrl GET items/<id>/workbook/worksheets GET items/{itemId}/workbook/worksheets('Time’)/ range(address='a2:d4') © 2014 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

41 Update latest timesheet data
9/16/2018 4:38 AM Update latest timesheet data PATCH items/{itemId}/workbook/worksheets('Sheet1')/ range(address='a2:b2') { "values": [ ["September", "200.0"] ], "valueTypes": [ ["String", "Double"] ], } © 2014 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

42 Intune functions

43 Intune app provisioning code
9/16/2018 4:38 AM Intune app provisioning code POST { "#microsoft.graph.iosStoreApp", "description":"Collab app for iPhone.", "displayName": "Collab App", "isFeatured": false, "publisher": "atwork", "appStoreUrl": " "applicableDeviceType": { "iPad": true, "iPhoneAndIPod": true }, "minimumSupportedOperatingSystem": { "v7_1": false, "v8_0": true, "v9_0": false } { "#microsoft.graph.iosGeneralDeviceConfiguration", "id": "c7d530ac-f e-b77c-3e686814f654", ... } © 2014 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

44 Intune app-assignment code
9/16/2018 4:38 AM Intune app-assignment code POST { "mobileAppGroupAssignments": [ "targetGroupId": "{GuidOfMyO365Group}", "installIntent": "required" } ] © 2014 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

45 Improved developer experience
Microsoft Build 2017 9/16/2018 4:38 AM Improved developer experience Updated: Portal Graph Explorer Documentation Samples Tooling © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

46 Coming to Microsoft Graph
Microsoft Build 2017 9/16/2018 4:38 AM Coming to Microsoft Graph New data sets More permission options and improved consent experience Richer query capabilities General availability of preview features Hybrid, batching, webhooks for users and groups © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

47 Call to Action Microsoft Build 2017 9/16/2018 4:38 AM
© Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

48 Follow / Check out https://graph.microsoft.com #MicrosoftGraph
9/16/2018 4:38 AM Follow / Check out Twitter #MicrosoftGraph GitHub /MicrosoftGraph StackOverflow [MicrosoftGraph] © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

49


Download ppt "Dive into the Power of the Microsoft Graph"

Similar presentations


Ads by Google