Working with the data from Microsoft 365 in your code and in your businesses.
Early in his tenure as Microsoft CEO, Satya Nadella described the original Office 365 APIs as Microsoft's most valuable product. If anything, he was underestimating their value as, now renamed the Microsoft Graph, they're underpinning much of the modern Microsoft. Building on the original Office 365 APIs, the Graph has become a way of linking people, devices, and the work they do.
LEARN MORE: Office 365 Consumer pricing and features
One of the more important features of the Graph is that it's not just for Microsoft, it's a tool that you can build into your own apps and services. Of course Microsoft uses it in its own apps, providing real-time collaboration in Office, or surfacing actions inside Teams, or as elements that can be added to any SharePoint site, but the real value comes when you start mixing the Microsoft Graph with other services and with your own data.
Inside the Graph
Initially the Microsoft Graph was exposed as a set of REST APIs based on the OData query language. It's a surprisingly powerful tool, giving you a way of making complex queries across all your users and all their data, from Office documents, to emails, to contacts, and the devices they're using. The expansion of the Graph to all Microsoft 365 services (and to Microsoft accounts for consumers) has meant it can now pull on Azure Active Directory and on Intune as well as on Office 365 data.
SEE: Windows 10 security: A guide for business leaders (TechRepublic Premium)
Those original Office 365 APIs are still your best jumping off point into the Microsoft Graph. Building them into apps and services can help automate common business processes and give you new insights into how work is being done in your business. Say you're wanting to staff up a new project and need to quickly find the right people for it. An app that searches your company documents for relevant keywords can help track down experts, and can then be used to check availability with staffing tools and with their calendars.
Working with the APIs can be tricky; it can be hard to construct the right query, especially if you're looking for more complex graph queries. Microsoft offers tools to help build and test queries, as well as SDKs that can simplify adding Graph support to your apps. One, the web-based Graph Explorer, allows you to try out queries without logging in to an Office 365 account. It provides sample queries that show how to extract specific information from the service, with a library of different queries to get started. You can only use GET queries against sample data; POST requires your account details and your data.
Once you're ready to start working with live data, you can log in with a Microsoft account, and start using your Microsoft 365 tenant. The list of query categories is long, covering working with users, with mail and calendar, as well as files and apps. The Graph Explorer doesn't only show production queries, it supports beta APIs, so you can experiment before adding them in your code. Queries can be cut-and-pasted from the Explorer, and you can see any request headers or bodies that need to be constructed and delivered with the REST HTTP query.
The Office 365 API Editor
If you don't want to use a web application to test your calls, a new tool is currently under development on GitHub. The Office 365 API Editor works in two different modes. The first is as a Mailbox Viewer, showing how you can use the Microsoft Graph to work with mail and other Exchange features. This is a useful debugging tool for checking out mailboxes without using the Outlook web client or setting up new profiles in desktop Outlook. If you're looking for a development tool, you can switch to Editor mode, where you can build and test queries. It offers a similar set of features to those offered by the web-based Graph Explorer, and makes a useful alternative as well as offering the option of testing queries from inside your network.
Querying more than the Microsoft Graph
There's a lot of capability in the Microsoft Graph. But real value comes when you start bringing different data graphs together, using a tool like Microsoft's new Graph Data Connect. Designed to be secure, with granular controls, it uses Azure's existing Data Factory tooling to extract data from your Graph. As the Microsoft Graph contains a lot of personal data, take care to ensure that you're working inside any data protection regulations, as well as complying with industry specific rules, such as financial and health regulations.
Data is moved into Azure Data Lake or Blob Storage, where you can start mixing it with other application data and develop your own queries. There are online training tools to show you how to use your data, along with the Workplace Analytics tools. Data is extracted over an Azure Data Factory pipeline, so you can apply filters, for example by user, during the export if necessary. Each extraction requires explicit consent, so you'll need to set up an approval email group for service administrators to manage approval requests. Once exported, data is stored in JSON Azure storage blobs, ready for you to query it and use it in your apps.
Microsoft provides schemas for the currently supported data sets, which are currently focused on Exchange data -- emails, contacts, and calendars, as well as basic organizational information. Those schemas can help you design queries that join Microsoft Graph data with other data you might have, for example from your finance, CRM or ERP systems. Tools like Azure Data Explorer can be used to provide ad hoc queries on combined data sets, or if you're using Azure Data Lake you can take advantage of Azure's big data tooling to start developing complex queries across multiple data sets.
Taking the Graph beyond Office to your devices
The Microsoft Graph isn't only about Office 365, and Microsoft is rolling out more device-oriented features. These include its own Project Rome. Powering services like Windows 10's Timeline, Project Rome aims to link the document-centric side of the Microsoft Graph with its device model, allowing work to move between devices. It's the foundation of Windows 10's Your Phone tools that link device notifications and messages to a PC.
Project Rome SDKs are available for both iOS and Android, as well as Windows. They help identify nearby devices, using Bluetooth to set up device-to-device connections. Using Project Rome with the rest of the Microsoft Graph, it's easy to imagine a set of add-ins for Slack or for Teams that would allow ad hoc file sharing as part of a collaboration -- quickly distributing documents to everyone in a meeting, for example.
Another useful Graph feature is Graph Notifications. Using the Graph to manage notifications means that once a message has been seen and read in one app on one device, it's then dismissed on all their other devices. Using it in your apps can reduce distraction and keep users from feeling pursued by the most inconsequential of notifications.
There's a lot happening to the Microsoft Graph, and because much of the tooling is very new it's going to be some time before we see what gets built using it. There's certainly a lot there, and the ability to extract data from the graph and use it in your own data lakes shows a lot of promise -- especially for combining Microsoft Graph data with other big datasets in your network. It'll be interesting to see what gets built, and what insights organizations gain.
- Machine learning: A cheat sheet (TechRepublic)
- Artificial intelligence: A business leader's guide (TechRepublic )
- How to add a drop-down list to an Excel cell (TechRepublic)
- IT leader's guide to deep learning (TechRepublic Premium)
- What is AI? Everything you need to know about Artificial Intelligence (ZDNet)
- 6 ways to delete yourself from the internet (CNET)
- Artificial Intelligence: More must-read coverage (TechRepublic on Flipboard)