ms graph and spfx - wordpress.com · 2018. 10. 11. · users groups sharepoint outlook onenote...

15
MS Graph and SPFx Gašper Rupnik, SharePoint Developer, Kompas Xnet d.o.o.

Upload: others

Post on 02-Oct-2020

12 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: MS Graph and SPFx - WordPress.com · 2018. 10. 11. · Users Groups SharePoint Outlook OneNote Planner Teams Excel Intune Azure AD more… One endpoint Your app One token All users

MS Graph and SPFx

Gašper Rupnik, SharePoint Developer, Kompas Xnet d.o.o.

Page 2: MS Graph and SPFx - WordPress.com · 2018. 10. 11. · Users Groups SharePoint Outlook OneNote Planner Teams Excel Intune Azure AD more… One endpoint Your app One token All users

SITES

GROUPS

ME

CONVERSATIONS CONTENT

INSIGHTS

CONTACTS

PEOPLE

ORGANIZATION

TASKSEMAIL

EVENTS

DOCUMENTS

DEVICES

CHATS

TEAMS

ACTIVITY

TRENDING

SHARED

REPORTS

Microsoft Graph

Page 3: MS Graph and SPFx - WordPress.com · 2018. 10. 11. · Users Groups SharePoint Outlook OneNote Planner Teams Excel Intune Azure AD more… One endpoint Your app One token All users

Microsoft Graph

Office 365 Platform

STANDALONE WEB AND

DEVICE APPS

Extensions

Embedded canvases

Page 4: MS Graph and SPFx - WordPress.com · 2018. 10. 11. · Users Groups SharePoint Outlook OneNote Planner Teams Excel Intune Azure AD more… One endpoint Your app One token All users

Users Groups Outlook OneNote more…SharePoint IntuneTeams Azure ADPlanner Excel

https://graph.microsoft.com

Your appOne endpoint

One token

All users

Microsoft Graph API

Access user, group and organizational data

Page 5: MS Graph and SPFx - WordPress.com · 2018. 10. 11. · Users Groups SharePoint Outlook OneNote Planner Teams Excel Intune Azure AD more… One endpoint Your app One token All users

Calling the API

• 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

o Format results: $select | $orderby

o Control results: $filter | $expand

o Paging: $top | $skip | $skiptoken

/{version} ?{query-parameters}/{resource}/{id}/{property}

Page 6: MS Graph and SPFx - WordPress.com · 2018. 10. 11. · Users Groups SharePoint Outlook OneNote Planner Teams Excel Intune Azure AD more… One endpoint Your app One token All users

SDKs, samples and tooling

Page 7: MS Graph and SPFx - WordPress.com · 2018. 10. 11. · Users Groups SharePoint Outlook OneNote Planner Teams Excel Intune Azure AD more… One endpoint Your app One token All users

Calling the Microsoft Graph

MicrosoftGraph

Page 8: MS Graph and SPFx - WordPress.com · 2018. 10. 11. · Users Groups SharePoint Outlook OneNote Planner Teams Excel Intune Azure AD more… One endpoint Your app One token All users

Many different APIs to access data

Separate auth stacks for work and personal

State of the world before Microsoft Graph

Work and school Personal

Page 9: MS Graph and SPFx - WordPress.com · 2018. 10. 11. · Users Groups SharePoint Outlook OneNote Planner Teams Excel Intune Azure AD more… One endpoint Your app One token All users

Today’s world with Microsoft Graph

Microsoft Graph

(https://graph.microsoft.com/)

Work and school Personal

Page 10: MS Graph and SPFx - WordPress.com · 2018. 10. 11. · Users Groups SharePoint Outlook OneNote Planner Teams Excel Intune Azure AD more… One endpoint Your app One token All users

Connect to Microsoft Graph from Sharepoint (SPFx)

• Available from SPFx 1.4.1

• Helper class for connecting to Microsoft Graph

• Declarative permission scopes model

• Simplified Permission Grant model

Page 11: MS Graph and SPFx - WordPress.com · 2018. 10. 11. · Users Groups SharePoint Outlook OneNote Planner Teams Excel Intune Azure AD more… One endpoint Your app One token All users

Helper Class for Connecting to Microsoft Graph

•MSGraphClient

• Simplifies connecting to the Microsoft Graph

• Wraps existing Microsoft Graph JavaScript Client Library

• Handles authenticating for you

• Supports Microsoft Graph TypeScript Types

Page 12: MS Graph and SPFx - WordPress.com · 2018. 10. 11. · Users Groups SharePoint Outlook OneNote Planner Teams Excel Intune Azure AD more… One endpoint Your app One token All users

Declarative Permission Scopes Model

• Targets Multiple APIs

• Supports Microsoft Graph Scopes

• One per Solution

"webApiPermissionRequests": [{"resource": "Microsoft Graph","scope": "User.ReadBasic.All"}

Page 13: MS Graph and SPFx - WordPress.com · 2018. 10. 11. · Users Groups SharePoint Outlook OneNote Planner Teams Excel Intune Azure AD more… One endpoint Your app One token All users

Simplified Permission Grant Model

• Available in SharePoint Tenant Administration

• Tenant Admin Consent

Page 14: MS Graph and SPFx - WordPress.com · 2018. 10. 11. · Users Groups SharePoint Outlook OneNote Planner Teams Excel Intune Azure AD more… One endpoint Your app One token All users

Demos