In this article, we’ll talk about Microsoft Graph APIs and will show you a quick preview of the essential features. This technology is growing too fast so some existing features may not be longer available at the time of reading and surely new features will be added to it after the time of writing.
Microsoft Graph API – formerly known as Office 365 unified API - is the new service-oriented architecture owned by Microsoft to allow developers to access a vast amount of data from the Microsoft cloud platforms. Microsoft web API is essentially designed to collaborate with Office 365 and some other services hosted on the MS Azure cloud platform.
The Microsoft Graph APIs expose RESTful services. This makes it very flexible because REST is compatible with almost any modern platform programming language. The exchange format is essentially in JSON and it can be encapsulated into the HTTPS transport security. The central point of Microsoft Graph is the concept of User, the authentication and authorization follow the OAuth2.0 mechanism making the user and role management to be standard for developers.
At the time of writing, Microsoft Graph API v1.0 is a stable revision that fulfills all production qualifications. A beta revision is also available in parallel for the latest releases, however, its main purpose is for testing new functionalities by the early adopter, and in any way, it is not recommended to be deployed into the production environment.
As stated earlier Microsoft Graph API uses RESTful services. You need to have first a basic background about how REST is working. The next is to have a good grasp on how to build queries using REST sauce. This part is pretty the same thing as doing ADO.NET services queries. And the last but not the least one is to know the REST resource URL. For example, if you want to retrieve all the contacts for a given user, you should be aware of the exact resource URL matching your expectation. You may have noticed that those requirements remain valid regardless of any programming languages. After the server returns back to your apps, you need to write some codes in your favorite languages to parse JSON format in order to extract entities you may need to use. This is how it works at a basic level.
Microsoft, fortunately, provides language-specific SDK to communicate with Microsoft Graph in the test of object-oriented programming. If you’re going on that way, the SDK is managing automatically the whole process. Thus you’re not going to deal with basic HTTP requests; instead, you’re dealing directly with the platform object representation. The following technologies have a good integration within Microsoft Graph: ASP .NET MVC, Universal Windows platform, Php, Angular, Node.js, Ruby, and for mobile platforms Android, iOS Swift, iOS Objective-C, and Xamarin. We will show you a code snippet later on.
Microsoft provides a very helpful online utility name Graph Explorer to allow devs to test their REST queries in the easiest way. You can experiment with your own data on the cloud. The principle is done in 2 steps: sign in with your Microsoft Account, create your app credentials and secrets then run any queries you want in the URL query bar. It is available at https://developer.microsoft.com/en-us/graph/graph-explorer
From your Microsoft account (for example outlook.com ) you need to get an appID and secret from the Microsoft Application Registration portal. The appID and secret are used to identify your profile each time a request is made by the Microsoft Graph API. If you are familiar with Facebook/Twitter/Linkedin/Google plus application development the same mechanism is used here to access remote resources. If you omit this step or give a wrong AppID/secret the service will throw a notification with the corresponding error message.
Microsoft Graph API allows developers to build rich apps using a variety of data sources. Under the hood, it is more than a simple tool to access cloud storage. Microsoft Graph indeed comes with high-level interfaces and endpoints to perform business intelligence data analysis. This feature is very helpful if you are rowing in machine learning analysis or in a need of high-quality level of reports and dashboard plots. It comes with a bunch of insights algorithms for mining predictions and forecast purposes.
We enumerate below the essential components of Microsoft Graph that can be accessed using the API:
#microsoft #tutorial #api #rest #developers #graph #programmers #api access