用office 365和微软graph开发邮件应用 - microsoft · office 365 devdays 2017.11.4-6 |...
TRANSCRIPT
Office 365 DevDays
2017.11.4-6 | 上海
用office 365和微软Graph开发邮件应用
徐金林 Jinlin Xu
背景知识 Background
示范 Demonstration
学员尝试 Hands on practice
更多资源 More Resources
目 录CONTENTS
Graph之前的世界
Work and school Personal
有了Graph的世界
SUBTITLE OF THIS ARTICLE SUBTITLE OF THIS ARTICLE
点击请替换文字内容 点击请替换文字内容Microsoft Graph
https://graph.microsoft.com/
Work and school Personal
…
Highlight API Example -FindMeetingTimes
{“attendees” :[{“address”: “[email protected]”},
{“address”: “[email protected]”},{“address”: “[email protected]”}],
“timeConstraint”:{ “timeslots”: [{“start”: “2017-04-17T09:00:00”},
{“end”: “2017-04-17T17:00:00}]},
“MeetingDuration”: “PT2H”,“MinimumAttendeePercentage”: “90”….
}
{“meetingTimeSuggestions”:
[{“confidence”: “100.0”},{“meetingTimeSlot”:
{“start”: “2017-04-17T11:00:00”},{“end”: “2017-04-17T13:00:00”}},
……}
How can you achieve this by using EWS?
如何通过使用 EWS 来实现此目的?
背景知识 Background
示范 Demonstration
学员尝试 Hands on practice
更多资源 More Resources
目 录CONTENTS
背景知识 Background
示范 Demonstration
学员尝试 Hands on practice
更多资源 More Resources
目 录CONTENTS
Prerequisites
• Overview of Microsoft Graph
• Register you app with the Azure ADRead
• Visual Studio Professional
• Any web server (IIS Express works)Install
• Office 365 accountHave
Outcomes
In Scope
✓Learn about graph API and how to use them
✓Set up an graph based mail app
✓Exercise graph APIs to implement some real mail scenarios
Out of Scope
Exchange EWS
Complex “Outlook”
Exercise Modules
Warm up - setup
Send a mail to Jinlin
Get your meeting list
Query your contacts
Advanced - Build an Android App
https://github.com/Shanghai2017/ -> mail-app-o365-graph -> exercises
Warm up - setup
Overview
• In this module you will set up the solution and run the first Graph API.
Open the workshop code base
• mail-app-o365-graph/workshop-code-base
Register your app
• https://developer.microsoft.com/en-us/graph/docs/concepts/auth_register_app_v2
Update the configuration. Set up the web site.
• Update the "client_id" and "redirect_uri". Set up the web site root path.
Warm up - setup
Overview
• In this module you will set up the solution and run the first Graph API.
Download the workshop code base
• https://github.com/Shanghai2017/mail-app-o365-graph/tree/master/workshop-code-base
Register your app
• https://developer.microsoft.com/en-us/graph/docs/concepts/auth_register_app_v2
Update the configuration. Set up the web site.
• Update the "client_id" and "redirect_uri". Set up the web site root path.
Run and see your mail list.
• Run modified code, login and see your mail list.
Send a mail to Jinlin
Overview
In this module you will send a mail to Jinlin
Read the API to send mail
• https://developer.microsoft.com/en-us/graph/docs/api-reference/v1.0/api/user_sendmail
Implement send mail functions
• graph-mail.js
Send a mail to Jinlin
Get your meeting list
Overview
In this module you will get your meeting
Read the API to get meetings
• https://developer.microsoft.com/en-us/graph/docs/api-reference/v1.0/api/user_list_events
Implement get meeting functions
• graph-meeting.js
Find your meetings
Query your contacts
Overview
In this module you will query your contacts in your address book
Read the API to get contacts
• https://developer.microsoft.com/en-us/graph/docs/api-reference/v1.0/api/user_list_contacts
Implement get contact functions
• graph-contact.js
Query your contacts
Advanced: Build an Android App
Overview
In this module you will build your own android mail App
Download the Cordova code, replace the “www” folder
• https://github.com/Shanghai2017/mail-app-o365-graph/tree/master/more%20resources/Cordova
Register your mobile app
• https://developer.microsoft.com/en-us/graph/docs/concepts/auth_register_app_v2
Update the configuration for native client
• Update the “client_id”
Build the APK and try it on your phone
• http://cordova.apache.org/docs/en/latest/guide/platforms/android/index.html
背景知识 Background
示范 Demonstration
学员尝试 Hands on practice
更多资源 More Resources
目 录CONTENTS
更多资源
▪ https://developer.microsoft.com/en-us/graph
▪ http://stackoverflow.com/questions/tagged/microsoftgraph
▪Mail App with Graph and Office 365
Office 365 DevDays
Thank you