📜 ⬆️ ⬇️

Microsoft Graph for Developers

The new features of Microsoft Graph, announced at Build 2017, allow you to establish even more interesting relationships between people, their conversations, projects and content, not to mention the synchronization of work in your applications on different devices. Therefore, we decided to dwell on this tool and translated an article on new API interfaces and functions for developers. "Office" developers, welcome under cat. :)



At the Build 2017 conference, Microsoft introduced the new Microsoft Graph APIs and functions that significantly expand the capabilities of the toolkit offered to developers of business applications and business processes.

Microsoft Graph provides interaction between different entities — users, operations, and now between different devices, while maintaining collaboration and information sharing. Also, Microsoft Graph has the function of providing operational analytical data about the company.
')


Below, we will take a closer look at the new features of Microsoft Graph with an emphasis on three key themes: “Developing applications based on new enhanced datasets”, “Developing powerful applications with support for new platform features” and “Simple and easy application development using a simplified developer interface.” .

Developing Applications Based on New Extended Datasets


We continue to increase the number of datasets that are available in Microsoft Graph. Developers can use these additional data sets to develop smart applications using new APIs.

The SharePoint Sites API is now integrated with Microsoft Graph v1.0 endpoints


Earlier, we have already introduced the possibility of using SharePoint sites with the Microsoft Graph endpoint beta. Functions with which you can discover a set of metadata and links for SharePoint sites that are necessary for users, organizations and applications are now available for production use.

See here for more details .

API Planner is now integrated with Microsoft Graph v1.0 endpoint


The Planner API allows applications to create tasks and assign them to users in a group in Office 365. In addition to the announced support for assigning tasks to several users, there are also a number of updates, including a new segment / scheduler / for all scheduler resources, as well as a new scheme for specifying the orderHint properties.

For more information, see the Planner API documentation and Eray's video from our API team on the scheduler APIs on dev.office.com/build-videos.

The OneNote API is now integrated with Microsoft Graph v1.0 endpoint


API OneNote became available for production-use and integration with OneNote, which are stored in OneDrive for users and OneDrive for business. New features:

Authentication support in Azure AD v2.0 . New endpoint support features for authentication in Azure Active Directory (Azure AD) v2.0 will allow personal, work, and school user accounts to use the OneNote API on the Microsoft Graph endpoint.
Notepads for users and groups . All OneNote service calls using the Microsoft Graph API use the following root URL for the service:

https://graph.microsoft.com/v1.0/{location}/onenote/ 

It can point to users' notebooks in OneDrive for consumers and in Office 365 (in various Office 365 and OneDrive for Business groups). Support for notebooks hosted on the SharePoint site is planned for next release.

Additional information can be found in the OneNote reference documentation and in the video by Manjushi from our team of engineers on OneNote APIs.

Microsoft Teams API is now integrated into Microsoft Graph endpoint beta


Microsoft Teams is a new Office 365 chat-based workspace. Today, integration with Microsoft Teams is possible using extensions to the Groups API in the Microsoft Graph. The application determines which groups the user belongs to, lists the channels in this group, or even creates a new channel, and then sends a new message to the chat on behalf of the user. Imagine an incident management application that lets you inform the group of the current status of the incident with just one click. In addition, most existing API Groups (for example, file interfaces, notes, and plans) can also be used in Microsoft Teams. This is only the very first step towards advanced access to group chat messages and dynamically updated data through API interfaces.

For more information , see the Groups and Teams documentation.

New Insight APIs in Microsoft Graph Endpoint Beta


The Microsoft Graph API Insight provides real-time analytics based on user actions. For example, you can use the Trending API to get popular documents or the People API to get data about user collaboration. At the end of May 2017, it is planned to add two new Insight APIs: The Used and Shared APIs.

The Used API returns the documents that users in the company have worked on and will most likely want to return to in the future. This is a convenient way to access the most requested documents that the user has viewed or modified. These documents include documents used in OneDrive for Business and SharePoint.

The Shared API gives users the ability to return to the most requested documents shared by other users or even a specific user. This API combines files shared through email, meeting attachments, and modern attachments from OneDrive for Business, SharePoint, and from service providers such as Box, DropBox, and Google Drive.

Additional information can be found in Mario’s video from the team of our engineers on the Insight API in Microsoft Graph on a web page.

Updated SharePoint lists APIs in Beta Microsoft Graph endpoints


Organizations can use SharePoint to host sites, critical documents, and other digital resources. The Microsoft Graph endpoint beta has updated the SharePoint List APIs. These APIs allow you to work with a set of SharePoint lists that are relevant to users and organizations.

In addition to a set of basic scripts, access to lists, list resources, and rewriting of the attributes listItems and driveItems is also supported . A preliminary version has also been updated, which includes a new feature that allows you to create lists, content types and site columns for SharePoint lists.

More information you can find here .

API for creating reports in Office 365 in Microsoft Graph endpoint beta


Over the course of the year, we provided IT administrators with on-the-spot analysis of how users deploy and use Office 365. Now we have prepared a new set of APIs for creating reports in Microsoft Graph, available for preview by all users. Thanks to the API, users will be able to programmatically access data on usage reports and integrate them into existing reporting solutions.

Users have seventeen separate reports available. These reports reflect the use of Office 365 core products (email, SharePoint, Skype for Business, Yammer) or the Office 365 solution itself (active users, activation). Microsoft Graph creates a CSV file for each type of report selected.

Additional information can be found in the announcement of the API for creating reports in our blog and in the documentation for the API Reports .

Microsoft Graph for other products: Intune and other APIs


We are constantly improving and developing Microsoft Graph, adding new extended data sets that cover other products, not just the Office solution.

Intune API (updated beta) . Intune APIs, available in endpoint beta, provide new tools for managing organization resources, including users, devices, and applications.

API for managing Active Directory . This set of interfaces includes solution development tools that contain administrative blocks, domains, policies, and licensing.

API for remote use of devices and operations . Development of interfaces that provide interaction between devices and platforms and allow users to remotely use interfaces on desktops, Xbox, IoT, HoloLens and, of course, on smartphones running Windows, Android and iOS using new APIs for managing devices and operations, developed by Project Rom e.

Developing powerful applications with support for new platform features


We have introduced updates to the functionality of the Microsoft Graph platform, which allow you to develop powerful applications in many ways. Using this functionality, you can develop even more powerful solutions that can detect changes in Microsoft Graph datasets or extensions for these datasets and process them quickly.

Delta request


Synchronization of data in the application in accordance with changes in the cloud can be achieved using delta requests, which are now available in endpoint v1.0 and are fully operational.

A delta query allows apps to discover new, updated, or deleted objects without performing a full resource read in Azure Active Directory (Azure AD) and Outlook within each query. Now you can detect changes in the Users, Groups, Messages, Mailboxes, Calendar Events, Personal Contacts, Contact Folders, and Disks sections. Applications using local data stores can use delta queries to efficiently synchronize data with the Microsoft Graph. Stateless applications that do not use local data stores can also effectively use delta queries to perform simple operations to track changes in the resources you need.

Next, we will look at an example of sending an initial GET delta request to an Outlook calendarView address:

 GET me/calendarView/delta?startDateTime={start_datetime}&endDateTime={end_datetime} 

A GET request returns a nextLink or deltaLink object (which contains a URL with a delta function call and a state token).

For more information, see the general documentation for delta requests , as well as Jeff’s video from our team of engineers.

New Web Hooks


New Web Hooks in Microsoft Graph API. For client applications, a subscription to a notification of changes in some resources, including messages, events, contacts, group conversations and root disk elements, is already available. Today, we have prepared new subscription options for Azure AD for users and groups, as well as additional support features for Outlook.com resources. This will allow companies to create key processes to support new users and update profiles.

For more information , see the Web Hooks documentation and code examples provided on our website. Samples of Web Interceptor code in Microsoft Graph and related documentation are available on the GitHub portal for developers working with Node.js and ASP.Net. Be sure to check out the video in which one of our engineers, Jeff, talks about Web Hooks and delta requests.

Extensions to support user data in Microsoft Graph


Now you can use your own user data in Microsoft Graph. This feature is ready for production use. You will be able to combine your own user data (for example, add security levels / access levels to secret information or professional certifications to user profile data) with information in Microsoft Graph. Microsoft Graph allows you to create extensions and add custom properties to your resources without using external data stores.

Two types of extensions are available:


For more information, see the blog post for more information and sample code, as well as watch a video from Dan , one of our engineers.

Application performance optimization through batch processing


Using JSON batch processing requests, users can combine multiple Microsoft Graph requests within a single HTTP call.

A JSON batch processing request is always sent via POST to the end point / $ BATCH. JSON batch processing request text is a single JSON object and requires setting the request property. The request property in this case contains an array of individual required requests, as well as the identifier, method, and URL properties. In addition to the standard JSON batch processing request, support for grouping requests using the atomicityGroup property is also implemented. Batch processing requests can be sequential or asynchronous, and are also used to bypass restrictions on the length of the URL. Of course, there are a number of restrictions for such query functions.

More information . Detailed batch processing documentation will be published on graph.microsoft.com over the next few weeks.

Simple and easy application development using a simplified developer interface.


We continue to improve the developer interface. At the Build conference, we presented a number of extensions designed to improve the work with the Microsoft Graph for developers using various languages ​​and platforms.

New and updated pre-release versions of the Microsoft Authentication Library (MSAL)


We are pleased to present to your attention the preliminary versions of the Microsoft Authentication Library (MSAL) for iOS , Android and JavaScript , as well as an updated preliminary version of MSAL for the .NET platform. MSAL provides simple and convenient authentication for Microsoft personal accounts, as well as for Azure AD work and school accounts when calling Microsoft Graph. Even in the pre-release version, these libraries are fully supported for use in a production environment.

For more information , see the MSAL section and the Azure AD v2.0 endpoint.

Developer Interface Improvements


We have deployed an update of Graph Explorer, which contains new interface elements that extend its functionality. Graph Explorer users can now use pre-configured sample queries, set request headers, use message text templates, and more.



Now getting started with Graph Explorer has become much easier. We updated the quick start guide by reducing the number of steps to provide more meaningful examples demonstrating the work of several scenarios.

We also significantly improved the SDKs and added documentation. There are updated SDK packages for .NET and Android platforms, as well as fully ready-to-use Microsoft Graph SDK packages for JavaScript and PHP. Check out the video in which Dan and Caitlin (JavaScript and PHP experts, respectively) talk about how we improved the SDKs .

Visual Studio has updated the Connected Services interface in which you can now customize a project and register an application with just a few mouse clicks. More information is here .

The developer community has no boundaries, which is why we continue to work on the localization of materials on the Microsoft Graph developer portal. Materials are available in nine languages. Materials are now available not only in English, German, Japanese, and Chinese (simplified) languages, but also in French, Portuguese, Spanish, and Russian.

Additional information can be found in the blog , as well as in the materials for the new SDK package and on websites in French , Russian and other languages.

To all participants in the Build conference who took part in person or on the Internet, we are grateful that you took the time to read our blog. We hope that the functionality of Microsoft Graph, which we discussed here (new datasets, advanced platform tools and an improved developer interface), will help you develop more powerful, intelligent applications with advanced connectivity. We are always looking forward to your feedback on working with Microsoft Graph - your opinion is very important to us. Follow the news on our channel on Twitter by tag #MicrosoftGraph and send your questions to the Stack Overflow website, tagging them with the tag #MicrosoftGraph. Good luck in programming!

Source: https://habr.com/ru/post/329708/


All Articles