Mail, Calendar, and Contacts Graph API Demonstration Andrew Davidoff Senior Software Engineer Agenda

Total Page:16

File Type:pdf, Size:1020Kb

Mail, Calendar, and Contacts Graph API Demonstration Andrew Davidoff Senior Software Engineer Agenda Mail, Calendar, and Contacts Graph API Demonstration Andrew Davidoff Senior Software Engineer Agenda • Introduction to Office 365 Graph APIs • Endpoints, authentication and URLs • Sample Meeting Manager application • Sample API calls for Meetings, Contacts and Email • Demonstration of API usage with Meeting Manager application • Resources What is Microsoft Graph • Microsoft Graph exposes multiple APIs from Microsoft cloud services through a single REST API endpoint. • Using the Microsoft Graph, you can turn formerly difficult or complex queries into simple navigations. • The Microsoft Graph gives you: • A unified API endpoint for accessing aggregated data from multiple Microsoft cloud services in a single response • Seamless navigation between entities and the relationships among them • Access to intelligence and insights coming from the Microsoft cloud • All this using a single authentication token. What is accessible through Microsoft Graph • Entities: • Users, groups • Mail, messages, calendars, tasks, and notes • Files and documents • From multiple services: • Outlook, OneDrive, Azure Active Directory, Planner, OneNote and others • And more: • Relationships and team work items How to use Microsoft Graph APIs • You call resource URLs using one of operations permitted on the resource: • GET • POST • PATCH • PUT • DELETE • All Microsoft Graph API requests use the following basic URL pattern: • https://graph.microsoft.com/{version}/{resource}?[odata_query_parameters] What’s in URL? https://graph.microsoft.com/{version}/{resource}?[odata_query_parame ters] • For this URL: • {version} is the target service version, for example, v1.0 or beta • {resource} is resource segment or path, such as • users, groups, devices, organization • The alias me, which resolves to the signed-in user • The resources belonging to a user, such as me/events, me/drive or me/messages • The alias myOrganization, which resolves to the tenant of the organization signed-in user • [odata_query_parameters] represents additional OData query parameters such as $filter and $select • Summary of common requests available in the Overview • http://graph.microsoft.io/GraphDocuments/en-us/overview/overview.htm Sample Meeting Manager Application • Available on GitHub • https://github.com/OfficeDev/Interop-REST-Mail-Contacts-Calendar- Sample • Sample code for two platforms: Android and Windows (UWP) • The sample is a real working application and can be used as starting point or a set of building blocks • Both applications log requests and responses to let you examine real-life traffic • UWP application has advanced, detailed logging Sample API Calls for Meetings and Events • Calendar can be queried in two ways • Events for the given time period (does not expand meeting series) • Calendar view (with expanded meeting series) • Query meetings for a selected date GET https://graph.microsoft.com/v1.0/Me/calendarView?startDateTime={}&en dDateTime={}$orderby=start/dateTime • Get description of event instance or of event series GET https://graph.microsoft.com/v1.0/Me/events/{event_id} • Accept/decline event invitation POST https://graph.microsoft.com/v1.0/Me/events/{event_id}/accept Body={…} Sample API Calls for Address Book and Contacts • Query users from address book GET https://graph.microsoft.com/v1.0/users?$top=10 GET https://graph.microsoft.com/v1.0/users?$top=10&$filter=startswith(given Name,'a') • Query number of Contacts GET https://graph.microsoft.com/v1.0/Me/contacts/$count • Query first ten contacts GET https://graph.microsoft.com/v1.0/Me/contacts?$top=10&$skip=0&$order by=DisplayName • Get user photo GET https://graph.microsoft.com/v1.0/Me/contacts/{contact_id}/photo/$value Some API Calls for Email used in the Sample • In order to Reply To (or Forward) event message, the app first does a query for an event message that corresponds to the selected event: GET https://graph.microsoft.com/v1.0/Me/MailFolders/Inbox/messages?$filter=Subje ct eq '{subject}' and CreatedDateTime gt {event_created_datetime} • If the event message has been found, the app uses createreply, createReplyAll or createForward actions to create a draft message to be sent: POST https://graph.microsoft.com/v1.0/Me/messages/{message_id}/createreply • After user clicks Send on Email page, the app updates created message: PATCH https://graph.microsoft.com/v1.0/Me/messages/{message_id} Body = {…} • … and then sends it: POST https://graph.microsoft.com/v1.0/Me/messages/{message_id}/send Demonstration: Meeting Manager Resources • Starting points for app development: • http://dev.office.com • http://graph.microsoft.io • Summary of common requests available in the Overview • http://graph.microsoft.io/GraphDocuments/en-us/overview/overview.htm • Sample Meeting Manager application: • https://github.com/OfficeDev/Interop-REST-Mail-Contacts-Calendar- Sample • Read README.md for important details and registration details Questions or Comments? Thank You!.
Recommended publications
  • Paid Search and Microsoft Audience Ads BETTER TOGETHER
    Paid search and Microsoft Audience Ads BETTER TOGETHER Hand in hand, they deliver more eyeballs and clicks Whether it’s cookies with milk or cake and ice cream, some things are simply better together. The same rings true for combining search advertising’s finest with the best of native advertising. When used together, they can help marketers reach customers across multiple touch points of the user journey, and get high-quality clicks and conversions at scale. While native ads is a well-recognized ad format, we call them Microsoft Audience Ads. After all, it’s more about reaching the right audience and less about the ad type, right? Ad spend is growing for native and search In fact, it’s growing by double digits for both. 25% 11% Expected annual growth in Expected annual growth in native ad spending in the paid search ad spending U.S. through 20191 in the U.S. through 20202 2018 2019 2018 2019 2020 Looking to increase impressions and capture more purchase intent? Using native and paid search ads together can help you get results at scale. MORE HIGHER HIGHER HIGHER FREQUENTLY PURCHASE BRAND PURCHASE 53% VIEWED 32% INTENT 24% RECALL 18% INTENT DISPLAY VS. NATIVE NO BRAND AD VS. BRAND AD NO BRAND AD VS. BRAND AD BANNER VS. NATIVE Consumers viewed Searchers on Bing Searchers on Bing who Native ads registered native ads 53% more who saw a brand’s ad saw a brand’s ad were an 18% higher lift in frequently than they showed 32% higher 24% more likely to purchase intent than viewed display ads.3 purchase intent even recall the brand than banner ads.3 if they didn’t click on a those who didn’t see brand’s ad.4 the ad.4 Two powerful ways to run Microsoft Audience Ads Along with your search campaigns, add Microsoft Audience Ads to get more high-quality volume outside of search.
    [Show full text]
  • Team Microsoft Bryce Hrusovsky Reid Wildenhause Jingwei Wan Sam Batali Department of Computer Science and Engineering Michigan State University Fall 2019
    Project Plan ITPro Company Portal The Capstone Experience Team Microsoft Bryce Hrusovsky Reid Wildenhause Jingwei Wan Sam Batali Department of Computer Science and Engineering Michigan State University Fall 2019 From Students… …to Professionals Functional Specifications • Problem: The number of devices being deployed by corporate entities is growing, increasing the workload for IT specialists. ▪ Specialists need the ability to manage corporate devices while they are in the field. ▪ Microsoft Intune solves this problem, but requires a desktop or laptop computer to use. • Solution: Create a mobile application that allows IT specialists to easily monitor, manage and maintain corporate devices with Microsoft Intune directly from a mobile device. The Capstone Experience Team Microsoft Project Plan Presentation 2 Design Specifications • Cross Platform: The application is created to run in both iOS, Android, and UWP using Xamarin platform. 3 different platforms, different UI designs, same codebase for models and controls • Login Page: The first window a user interact with after the launch page. The user must enter correct login credentials (Email/Phone and Passwords) before being redirected to the main page • Main Page: The main window for the application. Contains multiple tabs, sidebar, and summary page, user information, and status • Navigation: The application contains various tabs, links in the sidebar which links users to other pages such as device(s) page, manage page, settings page, terms and services, and Help and support page The Capstone
    [Show full text]
  • Microsoft Graph Mark Stafford, Graph PM • Microsoft Graph, What and Why
    Microsoft Graph Mark Stafford, Graph PM • Microsoft Graph, what and why • 5 steps to your first Graph app • App patterns • 5 tips and tricks to become a Graph coder • What’s new and roadmap Office 365 Your tailored Windows 10 experiences or customizations Enterprise Mobility + Security 1 billion 1 million 100 billion users across work, monthly active apps Microsoft Graph life and edu using Microsoft Identity requests per month Your tailored experiences or customizations 18 trillion 90% 180 million Microsoft Graph nodes Fortune 500 monthly active users of Office 365 commercial Extend Microsoft 365 experiences Build your experience Web Bots & Device Daemon Workflow Documents Conversations Portals Timeline Search Analytics apps agents & native apps automation apps Microsoft Graph REST APIs and webhooks Your local data Microsoft Graph Azure AI platform Microsoft Graph Connectors Office 365 Windows 10 Enterprise Mobility + Security data connect Microsoft Identity Apps Web Native Bots Flows Automation Analytics Auth UX Libraries Capabilities Microsoft Graph Microsoft Graph Connectors Interfaces REST APIs and Webhooks Data Connect Data Microsoft 365 Your domain Apps Web Native Bots Flows Automation Analytics Auth UX Libraries Capabilities Microsoft Graph Microsoft Graph Connectors Interfaces REST APIs and Webhooks Data Connect Data Microsoft 365 Your domain Apps Web Native Bots Flows Automation Analytics Auth UX Libraries Capabilities Microsoft Graph Microsoft Graph Connectors Interfaces REST APIs and Webhooks Data Connect Data Microsoft 365
    [Show full text]
  • Douchebag Jar the Instant Karma App
    Douchebag Jar The Instant Karma App A full­stack mobile application development project Douchebag Jar The Instant Karma App Ett full­stack utvecklingsprojekt för mobilapplikationer Frida Nilsson Dan Gryttman The Faculty of Health, Science and Technology Computer Science Bachelor Thesis 15hp Supervisor: Katarina Asplund Examiner: Jonathan Vestin Date: 2021­05­31 Preface We want to thank our supervisors at Ubitech AB, Martin and Viktor, for your guidance, your patience and for your dedication. We would also like to thank our supervisor Katarina for helping us with the thesis, and reminding us that a thesis is also part of a project. Finally, we want to thank Elin, as she is the reason why we needed an app like this. i ii PREFACE Abstract Mobile applications are everywhere in today’s society, they come in many flavours and are an integral part of many peoples daily lives. The limits to development of mobile applications are expanding with each new idea of how the technology could be potentially used, and it is a field that is most likely going to continue to influence the world we live in. In this thesis, the objective was to develop a proof of concept for a mobile application for social interaction which is tightly anchored to the real world. The idea of the "Douchebag Jar" application was intended as a way for friends and coworkers to stay connected and keep having fun at each other’s expense by introducing a karma-based punishment/redemption system. The goal was to learn about mobile application devel- opment and the technologies behind it, get first hand experience with app development and become familiarised with tools used by professional app developers.
    [Show full text]
  • Breaching the Cloud Perimeter
    Breaching the Cloud Perimeter Brought to you by… © Offensive Tradecraft by BHIS @BHInfoSecurity https://www.blackhillsinfosec.com Roadmap • Breaching the Cloud Perimeter • Cloud Pentest Authorization • Cloud Authentication Methods • Reconnaissance • Exploiting Misconfigured Cloud Assets • Gaining a Foothold • Post-Compromise Recon • Pillaging Cloud Assets • Cloud Infrastructure Attacks • Weaponizing the Cloud for Red Team Operations © Offensive Tradecraft by BHIS @BHInfoSecurity https://www.blackhillsinfosec.com Cloud vs. On-Prem • What is different about penetration testing "the cloud"? • Traditional attacks, different angle • Post-compromise results in new challenges • More room for misconfiguration • Higher risk to orgs as services used by employees are now public facing © Offensive Tradecraft by BHIS @BHInfoSecurity https://www.blackhillsinfosec.com Author/Instructor • Beau Bullock (@dafthack) • Pentester / Red Team at Black Hills Information Security • Certs: OSCP, OSWP, GXPN, GPEN, GWAPT, GCIH, GCIA, GCFA, GSEC • Speaker: WWHF, DerbyCon, Black Hat Arsenal, BSides, Hack Miami, RVASec • Tool Developer: MailSniper, PowerMeta, DomainPasswordSpray, MSOLSpray, HostRecon Check-LocalAdminHash © Offensive Tradecraft by BHIS @BHInfoSecurity https://www.blackhillsinfosec.com Sources & Thanks! • Huge thanks to all the cloud pentesting blog/book authors & open source developers! • Sean Metcalf (@PyroTek3) & Trimarc - https://adsecurity.org/ • Karl Fosaaen (@kfosaaen) & NETSPI - https://blog.netspi.com/ • Ryan Hausknecht (@haus3c) & SpectorOps
    [Show full text]
  • Build Intelligent Mail, Contacts and Calendar Apps Using the Outlook REST Apis
    Build Intelligent mail, contacts and calendar apps using the Outlook REST APIs Andrew Davidoff Senior Software Engineer Agenda • General Overview • Microsoft Graph & Outlook API endpoints • Usage details • What’s new with the APIs • Key takeaways • Powerful: APIs to create powerful applications & services to drive productivity. • Secure: Industry standard OAuth flow that respects your authentication policies. • Easy to Use: REST APIs that are easy to use on any platform you choose. • Strategic: THE APIs to use across Office 365, Hybrid Exchange 2016 & Outlook.com. • Production Ready: Available now to build production apps & services at scale Overview Why do the REST APIs matter? • 100’s of millions of users • Office 365 & Outlook.com for production apps & services • Hybrid Exchange deployment support in preview • On-premises Exchange on our roadmap • Many of these are highly engaged Outlook users • Powerful, intuitive way to build apps & services • Granular, tightly scoped permissions to access data • Based on open standards – OAuth 2.0, JSON & OData 4.0 API Landscape • Modern APIs • Microsoft Graph • The API to use to build apps & services integrating w/ Office services for cloud & hybrid users • Outlook REST API • Outlook/Exchange specific API endpoint to use if Microsoft Graph doesn’t have the APIs yet. • Older APIs • Exchange Web Services (EWS) SOAP APIs • Available since Exchange 2007 SP1 for integration with Exchange. No granular access. • Exchange Active Sync (EAS) • Used by mobile device manufacturers for built-in messaging client. Requires licensing. • Not intended for any other integrations including line of business apps & services Modern API Basics – API Endpoints • Microsoft Graph: • Worldwide except China: https://graph.microsoft.com • China: https://microsoftgraph.chinacloudapi.cn • Outlook REST API: • Office 365 Multi-Tenant: https://outlook.office.com/api • China: https://partner.outlook.cn/api • Office 365 Dedicated: Per-customer URL.
    [Show full text]
  • CSP Technical Overview for Partners a General and Introductory Technical Overview of CSP's Architecture, Entities, Workflows and Tools
    Guidance Document CSP Technical Overview for Partners A general and introductory technical overview of CSP's architecture, entities, workflows and tools. The information contained in this document represents the current view of Microsoft Corporation on the issues discussed as of the date of the publication. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information presented. This document is for informational purposes only. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS DOCUMENT©2017 Microsoft Corporation. All rights reserved. Complying with all applicable copyright laws is the responsibility of the user. Without limiting the rights under copyright, no part of this document may be reproduced, stored in or introduced into a retrieval system, or transmitted in any form or by any means (electronic, mechanical, photocopying, recording, or otherwise), or for any purpose, without the express written permission of Microsoft Corporation. Microsoft Corporation may have patents or pending patent applications, trademarks, copyrights or other intellectual property rights covering subject matter in this document. The furnishing of this document does not provide the reader any license to the patents, trademarks, copyright or other intellectual property rights except as expressly provided in any written license agreement from Microsoft Corporation. Microsoft, Active Directory, ActiveSync, Outlook, SharePoint, SQL Server, Windows, Windows Live, Windows Mobile, Windows Server, and Windows Vista are trademarks of the Microsoft group of companies. The names of actual companies and products mentioned herein may be the trademarks of their respective owners.
    [Show full text]
  • Leveraging Microsoft Graph Presented by Jeff Greene Microsoft Graph “Microsoft Graph Is the Gateway to Data and Intelligence in Microsoft 365
    Leveraging Microsoft Graph Presented by Jeff Greene Microsoft Graph “Microsoft Graph is the gateway to data and intelligence in Microsoft 365. Microsoft Graph provides a unified programmability model that you can use to take advantage of the tremendous amount of data in Office 365, Enterprise Mobility + Security, and Windows 10.” Activity Feed “Microsoft helps drive user productivity with your apps through experiences like Windows Timeline, Windows Sets, Cortana Pick up Where I left off and Microsoft Launcher, which are all powered by the activity feed.” Activity Feed Use Activity Feed for This • Record a single activity for a group of related user actions. If your application is used for a sequence of related content, it probably makes sense to record a single activity for the entire engagement session. • If the same item is changed multiple times, include multiple history items to represent the repeated user engagement. • Store user data to the cloud. If you want to support cross-device activities, you need to make sure the content required to re-engage the activity is stored to a cloud location. For example, if you publish an activity each time a user edits a document, the document should be stored in the cloud as opposed to locally on the user’s device in order to enable cross-device re-engagement. Don’t Use Activity Feed Like This • Create a user activity for actions that users do not need to resume in the future. If your application is used to complete simple, one-time operations that do not persist status for you to track in the future, you probably do not need to write a user activity.
    [Show full text]
  • Microsoft Graph an Overview Johnathan Lightfoot Owner, Techforce, LLC How to Join Poll Everywhere Questions Web
    Microsoft Graph an Overview Johnathan Lightfoot Owner, TechForce, LLC How To Join Poll Everywhere Questions Web Go to PollEv.com Enter Jlightfoot158 Respond to Activity Thank You Thank You Introduction • In IT over 20 years • Worked with Microsoft Products since childhood • Co-Authored three books on SharePoint • A Microsoft Certified Trainer with various certifications • Born in Miami, Florida • Enjoys….Ooh look a squirrel! Microsoft Graph Overview • Microsoft Graph, what and why • 5 steps to your first Graph app • App patterns • 5 tips and tricks to become a Graph coder Office 365 Your tailored Windows 10 experiences or customizations Enterprise Mobility + Security 1 billion 1 million 100 billion users across work, monthly active apps using Microsoft Graph life and edu Microsoft Identity requests per month Your tailored experiences or customizations 18 trillion 90% 180 million Microsoft Graph nodes Fortune 500 monthly active users of Office 365 commercial Microsoft 365 Platform Extend Microsoft 365 experiences Build your experience Web Bots & Device Daemon Workflow Documents Conversations Portals Timeline Search Analytics apps agents & native apps automation apps Microsoft Graph REST APIs and webhooks Your local data Microsoft Graph Azure AI platform Microsoft Graph Office 365 Windows 10 Enterprise Mobility + Security Connectors data connect Microsoft Identity Microsoft Graph “a la carte” data and services Apps Web Native Bots Flows Automation Analytics Auth UX Libraries Capabilities Microsoft Graph Microsoft Graph Connectors Interfaces
    [Show full text]
  • SAS and Microsoft Office 365: a Programming Approach to Integration
    Paper SAS4439-2020 SAS® and Microsoft Office 365: A Programming Approach to Integration Chris Hemedinger, SAS Institute Inc., Cary, NC ABSTRACT Many of us are now using cloud-based productivity tools like Microsoft Office 365. And some of us are using SAS® software in the cloud, too. For those of us who use SAS to read and create Microsoft Excel documents, cloud-based files can add an extra wrinkle when we automate the process. It also adds some exciting possibilities! The Microsoft Office 365 suite offers APIs to discover, fetch, and update our documents using code. In this paper, I show you how to use SAS programs to reach into your Microsoft OneDrive and SharePoint cloud to read and update your files. And I show you how to leverage the collaborative features of Microsoft Teams to publish useful updates to your colleagues and yourself. The approach relies on the REST APIs in Microsoft Office 365 and on the HTTP procedure in SAS. The paper covers each step, including: • registering a new application in your Microsoft Office 365 account • authentication and access using OAuth2 • using SAS to explore your document folders in OneDrive and SharePoint and import into SAS data sets • using SAS to create new documents in OneDrive and SharePoint • sending rich messages to your teammates in Microsoft Teams In addition to the detailed steps, this paper references a GitHub repository with code that you can adapt for your own use. INTRODUCTION If your work environment is like ours here at SAS, you are seeing more of your data and applications move to the cloud.
    [Show full text]
  • Your Guide to Integrating with Microsoft Exchange
    2019 Your Guide to Integrating With Microsoft Exchange EAS, EWS, and Graph About Nylas Nylas is a developer platform that powers applications with email, calendar, and contacts integrations through a REST API. The Nylas API handles more than 100 million API requests per day and has synced more than 15 billion emails. 24,000 developers are signed up to use the API. We’re excited to share some of our learnings here. Overview While Exchange is billed as “email for enterprise”, it does, in fact, drive most business motions: internal and external email communications, calendar invites for meetings and interviews, and contacts databases. It makes sense then that many software applications are building two-way sync between their apps and user’s Exchange accounts. In Exchange’s 20+ year history, Microsoft has created numerous APIs — but with each new API comes a surge in ongoing maintenance and support as developers are forced to rip out the old protocols and implement the new ones. In this guide, we’ll dive into the three most commonly used protocols for integrating with Exchange: 1 EAS (ActiveSync) 2 EWS (Web Services) 3 Microsoft Graph 4 A better way to integrate with Exchange 2 EAS/ActiveSync EWS/Web Services Microsoft Graph How it’s used Mobile API for MS Exchange API for Office 365 synchronization intended for desktop/ protocol for mail, server applications calendar, contacts, & tasks Released 2002 2007 2015 SDK Support Precursors MAPI MAPI, WebDAV, EWS and other ActiveSync individual Office APIs On-prem Experimental support support for hybrid deployments Message format Binary-encoded XML XML SOAP JSON REST over HTTP Data Mail/calendar/ All of the Above All of the above contacts/tasks/notes + metadata and configuration (e.g.
    [Show full text]
  • 05102017 Build Harry Shum
    Build 2017 Harry Shum, Executive Vice President, Microsoft AI and Research Group May 10, 2017 HARRY SHUM: Good morning. It's great to be here. Thank you for listening to Satya, Scott and now me. Let me begin my talk by taking you back to the start of the day. Satya talked about this new app pattern, this new world view of the intelligent edge and the intelligent cloud. Central to this is artificial intelligence. And this is what I'm going to talk to you about now. I have been in the field of AI for a long time. It's amazing to see AI now becoming more a reality. I hope many of you by now know Microsoft Cognitive Services, but I'm not sure if any of you were in that small breakout room two years ago when we launched Cognitive Services with only four APIs. Maybe some of you were in that big breakout room last year when we launched it with 22 APIs. And this year apparently I have been promoted by Satya to the main stage. Seriously, the time for AI is now. At Microsoft, we believe AI is about amplifying human ingenuity. This is our vision for AI at Microsoft. You may ask why now? Well, there are three big forces converging that are making AI possible. The first, big compute, especially how you can take advantage of huge computing power in the cloud. Second, powerful algorithms with amazing progress in deep learning and deep reinforcement learning. Number three, massive amount of data that infuse powerful AI applications.
    [Show full text]