building intelligent apps using microsoft graph

42
Intelligent Apps using Microsoft Graph Roy Sheinfeld, Co-founder and CTO, harmon.ie – ESPC 16’

Upload: roy-sheinfeld

Post on 14-Apr-2017

218 views

Category:

Software


0 download

TRANSCRIPT

Page 1: Building Intelligent Apps Using Microsoft Graph

Building Intelligent Apps using Microsoft GraphRoy Sheinfeld, Co-founder and CTO, harmon.ie – ESPC 16’

Page 2: Building Intelligent Apps Using Microsoft Graph

The most strategic developer surface area for us is Office 365

”—Satya Nadella

2

Page 3: Building Intelligent Apps Using Microsoft Graph

Why use the Microsoft Graph?

Single API for accessing more than one workload – break the data silos

Ability to tap into consumer market (Work & Personal)

Ability to built Intelligent applications

3

Page 4: Building Intelligent Apps Using Microsoft Graph

Single API for accessing more than one workload

User Files ConversationsPeople & Groups

Events

MANAGER

CONVERSATIONS

EVENTS

FILES

MESSAGES

PEOPLE

Page 5: Building Intelligent Apps Using Microsoft Graph

USER FILESEMAIL AND

CONVERSATIONS PEOPLE

EVENTS

Data silos in the enterprise

GROUPS

5

Page 6: Building Intelligent Apps Using Microsoft Graph

Directory

Azure Active Directory Graph API https://graph.windows.net/contoso.com/usershttps://graph.windows.net/contoso.com/groups

USER PEOPLE

GROUPS

6

Page 7: Building Intelligent Apps Using Microsoft Graph

Extended Profile

SharePoint User Profilehttps://contoso.sharepoint.com/_api/SP.UserProfiles.PeopleManager/GetMyProperties Exchange HD Picturehttps://outlook.office365.com/api/v1.0/me/userPhoto

USER PEOPLE

GROUPS

7

Page 8: Building Intelligent Apps Using Microsoft Graph

Mail, calendar and conversations

Exchange REST API https://outlook.office365.com/api/v1.0/me/Messageshttps://outlook.office365.com/api/v1.0/me/Events

USEREMAIL AND

CONVERSATIONS EVENTS GROUPS

8

Page 9: Building Intelligent Apps Using Microsoft Graph

Files

OneDrive for Business/SharePoint Files API https://contoso-my.sharepoint.com/personal/roys_harmon_ie/_api/v1.0/fileshttps://contoso.sharepoint.com/sites/designCouncil/_api/v1.0/files

USER FILES PEOPLE

GROUPS

9

Page 10: Building Intelligent Apps Using Microsoft Graph

Office Graph

Office Graph in SharePoint Online https://contoso.sharepoint.com/_api/search/query?Querytext='*'&Properties='GraphQuery:actor(ME,action\:1020,or(action\:1020\,action\:1003,action\:1001,action\:1024,action\:1005,action\:1037,action\:1039,action\:1036)'&SelectProperties='Docid,Title

USER FILES PEOPLE

10

Page 11: Building Intelligent Apps Using Microsoft Graph

USERS FILES MAIL CALENDAR TASKSGROUPS

Microsoft Graph API (graph.microsoft.com)

Microsoft Graph rich relationships and insights

Your App

11

Page 12: Building Intelligent Apps Using Microsoft Graph

• Separate API for Work/Personal services• Separate oAuth stacks for Work/Personal services

Ability to tap into consumer market:Before the Microsoft Graph

Work and school Personal

12

Page 13: Building Intelligent Apps Using Microsoft Graph

Today’s world with Microsoft Graph

Microsoft Graph https://graph.microsoft.com

Work and school Personal

…13

Page 14: Building Intelligent Apps Using Microsoft Graph

userPhoto

/me

department

mobile

aboutMebirthday

tags

hireDatethumbnailPhotoaddressjobTitlenamealiaspastProjectsresponsibilitiesschoolsskills

USER

Page 15: Building Intelligent Apps Using Microsoft Graph

CodeGET https://graph.microsoft.com/v1.0/me

GET https://graph.microsoft.comv/v1.0/users/<id>

GET https://graph.microsoft.com/v1.0/users/[email protected]?$select=skills

GET https://graph.microsoft.com/v1.0/me/photo/$value

Page 16: Building Intelligent Apps Using Microsoft Graph

manager

directReport

s

GROUPS

memberOf

USER

/users

16

Page 17: Building Intelligent Apps Using Microsoft Graph

CodeGET https://graph.microsoft.com/me/manager

GET https://graph.microsoft.com/me/directReports

GET https://graph.microsoft.com/me/memberOf

GET https://graph.microsoft.com/users/<id>

GET https://graph.microsoft.com/users/[email protected]/directReports

Page 18: Building Intelligent Apps Using Microsoft Graph

manager

directReport

s

GROUPS

memberOf

/messages

MESSAGES

USER

18

Page 19: Building Intelligent Apps Using Microsoft Graph

CodeGET https://graph.microsoft.com/v1.0/me/messages

GET https://graph.microsoft.com/v1.0/me/messages?$top=5

GET https://graph.microsoft.com/v1.0/me/messages?$top=5&$skip=5&$orderby=DateTimeCreated

GET https://graph.microsoft.com/v1.0/me/messages?$top=5&$select=Subject,Sender&$search="from:[email protected]"

Page 20: Building Intelligent Apps Using Microsoft Graph

MESSAGES

manager

directReport

s

GROUPS

memberOf

/events

MESSAGES

EVENTSUSER

20

Page 21: Building Intelligent Apps Using Microsoft Graph

CodeGET https://graph.microsoft.com/v1.0/me/events

GET https://graph.microsoft.com/v1.0/me/events?$top=5

GET https://graph.microsoft.com/v1.0/me/calendarview?startdatetime=2016-11-01t01:00:00z&enddatetime=2016-11-16t23:00:00z

Page 22: Building Intelligent Apps Using Microsoft Graph

EVENTS

MESSAGES

manager

directReport

s

GROUPS

memberOf

/files

EVENTS

Shared with me

modifiedByFILE

S

createdBy

directReports

USERpublic

22

Page 23: Building Intelligent Apps Using Microsoft Graph

CodeGET https://graph.microsoft.com/v1.0/me/drives

GET https://graph.microsoft.com/v1.0/me/drives/<id>

GET https://graph.microsoft.com/v1.0/me/drive/items/<id>/lastModifiedByUser

GET https://graph.microsoft.com/v1.0/users/[email protected]/drives

GET https://graph.microsoft.com/v1.0/users/[email protected]/drive/items/<id>/lastModifiedByUser/manager

Page 24: Building Intelligent Apps Using Microsoft Graph

directReport

s

Shared with me

modifiedByFILE

S

createdBy

directReports

public

EVENTS

MESSAGES

manager

GROUPS

memberOf

/groups

directReport

s

Shared with me

modifiedByFILE

S

createdBy

directReports

public

createdBy

FILES

CONVERSATIONS

EVENTS

GROUPS

memberOf

USER

24

Page 25: Building Intelligent Apps Using Microsoft Graph

CodeGET https://graph.microsoft.com/v1.0/groups

GET https://graph.microsoft.com/v1.0/groups/<id>/members

GET https://graph.microsoft.com/v1.0/groups/<id>/drive

GET https://graph.microsoft.com/v1.0/groups/<id>/conversations

GET https://graph.microsoft.com/v1.0/groups/<id>/events/<id>/accept

Page 26: Building Intelligent Apps Using Microsoft Graph

1. Get a tenant-level entity set: /user

2. Select a member from the entity set: /user/{id}

3. Get an entity property:/user/{id}/department

4. Traverse to related entity type via navigation properties: /user/{id}/drives

Navigating the APIhttps://graph.microsoft.com

//{version}/{tenant}/{entity-set}

/{id}

/{property}

26

Page 27: Building Intelligent Apps Using Microsoft Graph

UX = Look & Feel

27

Look

Clean, modern UI

Feel

“Joy of Use”“Great Experience”

+ = Intelligent Apps

Increase Joy, Great UX

Page 28: Building Intelligent Apps Using Microsoft Graph

From Business Apps to Intelligent Apps

28

Top Down:

Identify key use cases and augment with insights

from the graph

Two approaches

Bottom up:

Identify useful APIs and then employ them to

enrich your app

Page 29: Building Intelligent Apps Using Microsoft Graph

Building Intelligent Apps – Scenario #1Saving Documents in (Document) Libraries

Old way:

Offer intuitive navigationtools to user

Intelligent app:

Old way +suggestions from the

graph

29

Page 30: Building Intelligent Apps Using Microsoft Graph

workingWith

workingWith

createdBy

FILES

CONVERSATIONS

EVENTS

GROUPS

memberOf

directReport

s

Shared with me

modifiedByFILE

S

createdBy

directReports

public

EVENTS

MESSAGES

manager

GROUPS

memberOf

workingWith

workingWith

recent

trendingAround

directReports

/recent

USER

30

Page 31: Building Intelligent Apps Using Microsoft Graph

CodeGET https://graph.microsoft.com/v1.0/me/drive/recent

GET https://graph.microsoft.com/v1.0/users/<id>/drive/recent

Page 32: Building Intelligent Apps Using Microsoft Graph

Building Intelligent Apps – Scenario #2Recommend content

Old way:

Task-dedicated app

New way:

Use of ‘Trending Around Me’ from the graph to improve engagement

32

Page 33: Building Intelligent Apps Using Microsoft Graph

workingWith

workingWith

createdBy

FILES

CONVERSATIONS

EVENTS

GROUPS

memberOf

directReport

s

Shared with me

modifiedByFILE

S

createdBy

directReports

public

EVENTS

MESSAGES

manager

GROUPS

memberOf

workingWith

workingWith

trendingAround

trendingAround

directReports

/trendingAround

USER

33

Page 34: Building Intelligent Apps Using Microsoft Graph

CodeGET https://graph.microsoft.com/beta/me/trendingAround

GET https://graph.microsoft.com/beta/contoso.com/users/[email protected]/trendingAround

Page 35: Building Intelligent Apps Using Microsoft Graph

Building Intelligent Apps – Scenario #3Contacting Colleagues

Old way:

Seek and find the contact alphabetically

New way:

Use ‘affinity’ from the graph to suggest “close”

contacts

35

Page 36: Building Intelligent Apps Using Microsoft Graph

createdBy

FILES

CONVERSATIONS

EVENTS

GROUPS

memberOf

directReport

s

Shared with me

modifiedByFILE

S

createdBy

directReports

public

EVENTS

MESSAGES

manager

GROUPS

memberOf

/workingWith

createdBy

FILES

CONVERSATIONS

EVENTS

GROUPS

memberOf

workingWith

workingWithUSER

36

Page 37: Building Intelligent Apps Using Microsoft Graph

CodeGET https://graph.microsoft.com/beta/me/workingWith

GET https://graph.microsoft.com/beta/users/[email protected]/workingWith

Page 38: Building Intelligent Apps Using Microsoft Graph

Extending the GraphPOST https://graph.microsoft.com/v1.0/me/contacts/<contactId>/extensions{ "@odata.type": "microsoft.graph.openTypeExtension", "ExtensionName": "Com.Contoso.OpportunityManager", "CompanyName": "Alpine Skis", "URL": "https://contoso.sales.com/opportunities/6389346343848"}

GET https://graph.microsoft.com/v1.0/me/contacts/<contactId>/ extensions/Com.Contoso.OpportunityManager

38

Page 39: Building Intelligent Apps Using Microsoft Graph

Extend Graph with Business data

39

Page 40: Building Intelligent Apps Using Microsoft Graph

Beyond the Microsoft Graph

Using Graph data to get insights for other services

40

Page 41: Building Intelligent Apps Using Microsoft Graph

Building your own graph

41

Page 42: Building Intelligent Apps Using Microsoft Graph

Thank You!

Contact me: @roysheinfeld or [email protected]