Wednesday, 25 January 2017

An Introduction to Microsoft Graph API

In the simplest terms Microsoft Graph is the easiest way to call the Microsoft APIs be it Users, Groups, Mail, Calendars, Contacts, Files etc. all from a single endpoint. This was previously known as the Office 365 Unified API. It exposes multiple APIs from Microsoft Cloud Services like Outlook, OneDrive, OneNote etc through a single REST API endpoint ( Prior to this, in order to fetch data from each of these services you have to make different endpoint calls to the respective services making it a complex procedure. Using Microsoft Graph, you just have to make a single endpoint call to the cloud services and require a single authentication token.
As per Microsoft, “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”

The Microsoft Graph API uses Azure AD for authentication. The basic flow to get your app authenticated is listed below:
  1. Request an authorization code
  2. Request an access token based upon the authorization code. Besides the access token, you also receive a refresh token.
  3. Make call to the Microsoft Graph endpoint.
  4. When the access token expires, use the refresh token to get a new access token instead of going through the entire authentication flow again.
To read the complete post click on the link here

Fetching User Profile Information using the SharePoint Framework Client Side Webpart

Microsoft made some major announcements on May 2016 regarding the “Future of SharePoint”. This announcement brings a whole lot of new things into the picture around the modern team sites, new publishing pages, new UI for list and libraries, new home page for the sites etc. As a developer, one of the biggest change amongst these new changes is a new development model called the SharePoint Framework. Our focus on this article will be to do some deep dive into this new development model and use it to build a sample client side webpart.

As per Microsoft, “The SharePoint Framework is a page and web model that provides full support for client-side SharePoint development, easy integration with SharePoint data, and support for open source tooling. With SharePoint Framework, you can use modern web technologies and tools in your preferred development environment to build productive experiences and apps that are responsive and mobile-ready from day one. The SharePoint Framework works for SharePoint on-premises and SharePoint Online.”

SharePoint Framework is a new modern and improved development model announced by Microsoft. It is a model that is solely focused on client side development. This new model is pure JavaScript based.  This allows developers to use modern JavaScript and web template frameworks to build applications. We don’t even require a SharePoint server to preview our customization. We have the SharePoint Workbench that provides us a test environment on our desktop itself. 

With the release of the first developer preview for the SharePoint Framework on August 18, 2016, we can actually do some research and get our hands dirty as to see what this new framework brings for us.

To read the complete post click on the link here