building solutions with the microsoft graph sdks · visual studio live! redmond 2016 t20...
Post on 05-Jul-2020
0 Views
Preview:
TRANSCRIPT
Visual Studio Live! Redmond 2016
T20 ‐ Building Solutions with the Microsoft Graph SDKs ‐ Paul Stubbs & Robert Anderson
Building Solutions with the Microsoft Graph SDKs
Paul StubbsRobert Anderson
Microsoft
One endpoint to rule them all
Visual Studio Live! Redmond 2016
T20 ‐ Building Solutions with the Microsoft Graph SDKs ‐ Paul Stubbs & Robert Anderson
MICROSOFT GRAPHThe easiest way to call Microsoft APIs
What is Microsoft Graph?Single API for:
Accessing data/me, /users, /groups, /messages, /drive, ….
Traversing data/drive/items/<id>/lastmodifiedByUser
Accessing insights/beta/me/trendingaround
Work/School and Personal
https://graph.microsoft.com/
Visual Studio Live! Redmond 2016
T20 ‐ Building Solutions with the Microsoft Graph SDKs ‐ Paul Stubbs & Robert Anderson
Individual Endpoint APIs
Azure Active Directory Graphhttps://graph.windows.net/contoso.com/usershttps://graph.windows.net/contoso.com/groups
Outlook Mail RESThttps://outlook.office.com/api/v2.0/me/Messageshttps://outlook.office.com/api/v2.0/me/Events
OneDrive for Businesshttps://contoso-my.sharepoint.com/personal
/pstubbs_contoso_com/_api/v2.0/drivehttps://contoso.sharepoint.com/sites
/designCouncil/_api/v2./drive
OneDrivehttps://api.onedrive.com/v1.0/drive
Windows Live profilehttps://apis.live.net/v5.0/me
SharePoint User Profilehttps://contoso.sharepoint.com/_api/SP.UserProfiles.PeopleManager/GetMyProperties
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
Exchange HD Picturehttps://graph.microsoft.com/v1.0/me/photo
Scattered and Inconsistent
Microsoft Graph APIs
Operation Service endpointGET my profile https://graph.microsoft.com/v1.0/me
GET my files https://graph.microsoft.com/v1.0/me/drive/root/childrenGET my photo https://graph.microsoft.com/v1.0/me/photo/$valueGET my mail https://graph.microsoft.com/v1.0/me/messagesGET my calendar https://graph.microsoft.com/v1.0/me/calendarGET my manager https://graph.microsoft.com/v1.0/me/managerGET last user to modify file foo.txt https://graph.microsoft.com/v1.0/me/drive/root/children/foo.txt/lastModifiedByUserGET users in my organization https://graph.microsoft.com/v1.0/usersGET group conversations https://graph.microsoft.com/v1.0/groups/<id>/conversationsGET people related to me https://graph.microsoft.com/beta/me/peopleGET my tasks https://graph.microsoft.com/beta/me/tasksGET my notes https://graph.microsoft.com/beta/me/notes/notebooksGET files trending around me https://graph.microsoft.com/beta/me/insights/trending
Centralized and ConsistentOne endpoint: https://graph.microsoft.com/
Visual Studio Live! Redmond 2016
T20 ‐ Building Solutions with the Microsoft Graph SDKs ‐ Paul Stubbs & Robert Anderson
Excel REST APIsExcel REST APIs are generally available as of Aug 3!
Power your own apps with Excel data and functionalities.
Interact with Excel objects through API just like any other user.
Workbook
Worksheet
Range
Table
Format
Chart
NamedItem
Sort
Protection
Functions
Filter
GET https://graph.microsoft.com /beta/me/drive/items/<id>/workbook/worksheets
v1.0 vs Betav1.0• Users
• OneDrive
• Excel
• Outlook Mail
• Outlook Calendar
• Personal Contact
• Groups
• Directory
• Webhooks
Beta• Users
• OneDrive
• People
• Tasks
• OneNote
• Excel
• Outlook Mail
• Outlook Calendar
• Personal Contact
• Groups
• Directory
• Privileged Identity Management
• Identity Protection
Visual Studio Live! Redmond 2016
T20 ‐ Building Solutions with the Microsoft Graph SDKs ‐ Paul Stubbs & Robert Anderson
Docs and SamplesDocumentationhttp://graph.microsoft.io/en-us/docs
Samplesmultiple platforms:
.NET (portable), iOS, Android, Python, Ruby. More coming …PHP, Java, JavaScript …
http://graph.microsoft.io/en-us/code-samples-a
Microsoft API Guidelineshttps://github.com/Microsoft/api-guidelines
DEMOGraph Explorer, Samples, and Docs
Visual Studio Live! Redmond 2016
T20 ‐ Building Solutions with the Microsoft Graph SDKs ‐ Paul Stubbs & Robert Anderson
MICROSOFT GRAPH SDKS
Microsoft Graph SDKsAbstract complexities of REST
Feel natural on each platform
Support intellisense and annotations
Easy authentication integration
Available on multiple platforms.NET (portable), iOS, Android, Python, Ruby. More coming …PHP, Java, JavaScript …
Open Source – Community participation
Target the /v1.0 branch
Visual Studio Live! Redmond 2016
T20 ‐ Building Solutions with the Microsoft Graph SDKs ‐ Paul Stubbs & Robert Anderson
DEMOBuilding Graph Apps with the SDKs
AUTHENTICATION
Visual Studio Live! Redmond 2016
T20 ‐ Building Solutions with the Microsoft Graph SDKs ‐ Paul Stubbs & Robert Anderson
OAuth 2.0 Basicshttps://login.microsoftonline.com/{tenant}/oauth2/v2.0/authorize https://login.microsoftonline.com/{tenant}/oauth2/v2.0/token
https://apps.dev.microsoft.com/App Registration
Endpoints
Application ID https://graph.Microsoft.com/v1.0https://graph.Microsoft.com/beta
Microsoft GraphYour App
You
Azure AD v2 Endpoint
• Sign in with both personal and work accounts
• MSAL – library (prerelease)
• New app registration portal
• One app Id for all platforms
• Dynamic Scopes – incremental consent
• Still in Preview – more to come
Visual Studio Live! Redmond 2016
T20 ‐ Building Solutions with the Microsoft Graph SDKs ‐ Paul Stubbs & Robert Anderson
DEMOAuthentication in action
QUESTIONS?
Visual Studio Live! Redmond 2016
T20 ‐ Building Solutions with the Microsoft Graph SDKs ‐ Paul Stubbs & Robert Anderson
Community ResourcesGitHub SamplesAll Samples http://github.com/microsoftgraph
UWP : http://aka.ms/uwpgraphsamples
iOS : http://aka.ms/iosgraphsamples
Android : http://aka.ms/androidgraphsamples
Node.js : http://aka.ms/nodejsgraphsamples
PHP : http://aka.ms/phpgraphsamples
Python : http://aka.ms/pythongraphsamples
Ruby : http://aka.ms/rubygraphsamples
ASP.Net : http://aka.ms/aspnetgraphsamples
Angular : http://aka.ms/angulargraphsamples
Stack Overflowhttp://stackoverflow.com/questions/tagged/microsoftgraph
UserVoicehttp://officespdev.uservoice.com/
Twitterhttps://twitter.com/search?q=microsoftgraph
Microsoft Graph Resources• Office Platform Overview
https://channel9.msdn.com/Events/Build/2016/B872
• Build Smarter Apps by Connecting to Office Serviceshttps://channel9.msdn.com/Events/Build/2016/B820
• Build Cool Apps with the Microsoft Graph, Tap into the Intelligence and Reach Millions of Usershttps://channel9.msdn.com/Events/Build/2016/T617
Visual Studio Live! Redmond 2016
T20 ‐ Building Solutions with the Microsoft Graph SDKs ‐ Paul Stubbs & Robert Anderson
top related