Beginning Microsoft Graph with JavaScript Applications

  • Sahil Malik

Your browser needs to be JavaScript capable to view this video

Try reloading this page, or reviewing your browser settings

You're watching a preview of subscription content. Log in to check access

Integrate the Microsoft Graph API in your JavaScript applications and harness a rich source of organizational information and functionality such as Mail, Calendars, Users, Groups, Applications, and a lot more. Any serious application integrating with Office 365 has to integrate with Microsoft Graph. Given the multitudes of ways to integrate, it is non-trivial to make it happen. Enlisting the approach of defining the problem, explaining the concept, and providing a usable solution, the author teaches the viewer by example. The video is succinct, bypassing marketing fluff to get to the usable code that you can start using right away

What You Will Learn

  • Understand the basics of Microsoft Graph

  • Integrate Microsoft Graph in JavaScript applications using AngularJS and Angular 2+

  • Work with examples from common scenarios, making comprehension of the integration extremely simple and straightforward.

  • Jumpstart your learning of Microsoft Graph avoiding common pitfalls and frustrations

Who This Video Is For

Anyone who is interested in learning how to integrate Microsoft Graph functionality into a JavaScript application. It is highly recommended that the viewer be proficient in writing client-side JavaScript-based web applications.

About The Author

Sahil Malik

Sahil Malik is Founder and Principal of Winsmarts.com, a company specializing in Office, SharePoint, cross-platform, and Microsoft development. He has been a Microsoft MVP for more than 10 years and has authored books, courses, and articles in leading technology journals on various Microsoft topics. As a consultant and trainer with teaching experience across 5 continents and 18 countries, Sahil blends experience and passion to make even the most complex topics approachable.

You can follow him on Twitter at @sahilmalik. Additionally, he maintains a social media presence at the following sites:

https://www.linkedin.com/learning/developing-cordova-apps-with-visual-studio-code-and-typescript/welcome

https://vimeo.com/204416450

https://vimeo.com/search?q=Sahil+Malik

https://app.pluralsight.com/profile/author/sahil-malik

 

About this video

Author(s)
Sahil Malik
DOI
https://doi.org/10.1007/978-1-4842-3965-0
Online ISBN
978-1-4842-3965-0
Total duration
1 hr 5 min
Publisher
Apress
Copyright information
© Sahil Malik 2019

Related content

Video Transcript

Sahil Malik: Welcome to Introduction to Microsoft Graph with JavaScript applications. Let’s start with some mutual introductions. Little bit about me. My name is Sahil Malik and I’m a consultant, author, and trainer. I’ve written 20 plus books, been an MVP for 15ish years, spoken at numerous conferences and videos. This is my twitter handle and that’s my website through which you can reach me. Let’s get started.

As more and more organizations are moving their data and functionality into the cloud. Naturally for a lot of third party vendors and custom code, there is a lot of value in your applications being able to tap into this data and functionality. You can do so using Microsoft Graph. Microsoft Graph is nothing but just a bunch of rest API’s that you can call, but you need to authenticate. You need to authenticate with something called Az- Azure AD. Azure active directory, I’ll be introducing all these terms to you in depth through this video. But yes, your applications need to authenticate properly, and then they can just call a rest API to tap into this rich data and functionality that is sitting in the cloud.

So let’s say that you see the value in tapping into this functionality. So what are the steps we go through? Well number one, you need to pick a platform. There are lots of different kinds of applications. Microsoft Graph doesn’t care what your platform is whether it’s an IOS app, Android app, web application, Demon, really anything. As long as it can call a REST service, it qualifies to use Microsoft Graph.

Next thing. Well we need to authenticate. Authenticate here involves learning some basics about Azure AD, and there are a lot of different ways to authenticate, and the specific way that you pick is dependent on the platform of choice.

Your first question. Pick a platform. Once you have authenticated, then you just call a REST API. So remember, picking the right platform and authenticating dictates how exactly you’re going to authenticate and how will you manage the token or session. For instance, web applications prefer to maintain session using well the web session. Whereas, native applications use refresh tokens and access tokens, and as we’ll see shortly, JavaScript applications cannot make use of refresh tokens. I’ll be talking about that in this course.

Once you have authenticated, then it’s just a matter of calling a REST API with an access token. Simple as that. Our focus here is to call Microsoft Graph from JavaScript applications. So remember that the gambit of what you can call Microsoft Graph from is pretty wide. IOS applications, Android, native applications, websites, web API’s, these are all topics we can dive deeper into.

However, my focus here is to talk about JavaScript applications talking to Microsoft Graph, and specifically in order to do that, we will use something called OAuth2 Implicit Flow. This is into something I will be explaining in the subsequent segments.

Let’s talk about the objectives we wish to achieve. After this introduction, I’ll introduce you to the major players. Scenario Description: What is Azure AD? What is Microsoft Graph? What are JavaScript applications? Then we’ll dive into some technical details and talk about OAuth2 Implicit Flow, things like token management, what libraries am I using, V1, V2 API’s. All this will become clear shortly, and once we have all that theory behind us, then we will build an application, set up a project. How do you set up your application in Azure AD and how do you authenticate and call Microsoft Graph? And then we’ll end with exploring the possibilities. What else can you build with this technology? Let’s get started.