Office365 and AzureAD for Developers

Understand the fundamental AzureAD concepts necessary for calling Office365 APIs, 3rd party APIs, and custom APIs
4.2 (33 ratings)
Instead of using a simple lifetime average, Udemy calculates a
course's star rating by considering a number of different factors
such as the number of ratings, the age of ratings, and the
likelihood of fraudulent ratings.
• 1,324 students enrolled
$19
$20
5% off
Take This Course
  • Lectures 129
  • Length 7.5 hours
  • Skill Level Intermediate Level
  • Languages English
  • Includes Lifetime access
    30 day money back guarantee!
    Available on iOS and Android
    Certificate of Completion
Wishlisted Wishlist

How taking a course works

Discover

Find online courses made by experts from around the world.

Learn

Take your courses with you and learn anywhere, anytime.

Master

Learn and practice real-world skills and achieve your goals.

About This Course

Published 1/2016 English

Course Description

Developing for Office365 is figuring out Azure AD, and mostly REST queries. The REST queries are the easy part. But a proper understanding of how Azure AD works from a developer’s perspective is the more important part. Whether you are developing for Office 365 or not, as your organization embraces the cloud, a solid understanding of developer concepts in Azure AD is necessary. This course provides hands on explanations of all the AzureAD scenarios you need to know as a developer, followed by tying that knowledge in Office 365 APIs and the Microsoft Graph. Lots of hands on examples and code in this course.

What are the requirements?

  • You should have a good grasp on ASP.NET
  • Some understanding of AngularJS is desirable
  • Some understanding of WPF is desirable

What am I going to get from this course?

  • Write apps for AzureAD
  • Write apps for Office 365
  • Understand all auth related concepts and scenarios

What is the target audience?

  • Microsoft developers intending to target Office 365
  • Microsoft developers intending to target Azure AD
  • Microsoft developers who want to learn about security in the cloud

What you get with this course?

Not for you? No problem.
30 day money back guarantee.

Forever yours.
Lifetime access.

Learn on the go.
Desktop, iOS and Android.

Get rewarded.
Certificate of completion.

Curriculum

Section 1: Introduction
03:52

A brief history of SharePoint explaining how we got where we are.

03:54

Developing for Office 365 today is full of a perplexing list of choices. Which one of these is the right tool for the right job? And how about on-premises to cloud migration? This module is an introduction to the various choices you as a developer face.

02:00

Given the various choices, I have chosen to emphasize certain choices over others. Also, I have given a lot of focus to AzureAD since mastering that is key in understanding Office 365 APIs. Here I introduce how I have structured this course, and why.

Section 2: WSPs or Solution Packages
02:56

A high level introduction to what a solution package is, and the difference between a sandbox solution and a farm solution. If you are quite familiar with SharePoint development, feel free to skip this section.

07:56

The process of writing a simple solution package, and how much of it applies to Office 365.

Section 3: SharePoint Add-ins also known as Apps
03:46

What are SharePoint apps, now known as SharePoint Addins?

03:31

Keeping your custom code outside of SharePoint has unique advantages, and is necessary for Office 365. Here we look at why buying into the App Model can be advantageous for you.

03:27

Apps is a big topic, but Office 365 APIs is a superior architecture. Apps will mature further, but in their current incarnation they have some serious shortcomings. Based on that, what coverage will I give to this topic, and why.

07:06

The golden rules or guiding principles of the App Model that are absolutely critical to understand.

04:02

SharePoint apps or addins can be classified in multiple ways based on different criterion. Here I talk about the different kinds of SharePoint apps.

01:26

Developing or running apps requires some unique changes to your dev environment. Here I talk about how to setup your environments to run SharePoint apps.

01:00

Time to see some code, but apps is not the focus of this course. Still it is worth mentioning for knowledge completion purposes. So what specific scenarios will I show, and how can you learn the rest.

08:12

A SHA runs entirely in SharePoint. Here I demonstrate how to write it, and how to host it. And I mention the limitations too.

07:58

An AppPart or ClientWebPart is an Iframe that pretends to be a webpart. It has some serious limitations, but solves some scenarios. Here I talk about how to write an AppPart and the various challenges it presents.

04:09

PHAs are very powerful, but also more complex to deploy. They have some unique differences between on-premises and Office365, and here I will introduce you to PHAs.

15:11

Here I demonstrate how to write a provider hosted app, and how you can deploy it on-premises and in Office 365

Section 4: Introduction to Azure AD and Office 365 APIs
06:49

Why did we need Office 365 APIs and what is Microsoft Graph and why is it so important.

03:56

Azure AD is not your dad's on-premises AD. Why did we need a new concept, what does it buy us, and what is it's value?

02:07

On-Premises AD has some serious limitations, and AzureAD is quite different from it.

02:02

AzureAD is very flexible, and is designed to suit the needs of every enterprise, small, medium or large. What are those scenarios and how does it affect you the developer?

00:59

As a developer, what can you do with Azure AD?

01:09

What is ADAL, why has Microsoft created it, how can you obtain it, and why I highly recommend that you use it?

01:29

AzureAD needs to know about your app for your app to be able to make use of it. What does it mean when I say "registering your app", and what information does AzureAD need and why?

01:48

What is tenancy, why should you care, and how does AzureAD help you here?

06:06

As a developer interested in AzureAD, there are many dev. scenarios to learn. Here I describe the list of those scenarios, how they apply to Office 365, and then subsequently in rest of the course I will be covering each one of those.

Section 5: Setting up AzureAD
03:27

Office 365 uses AzureAD, but AzureAD can be used completely independent of Office365. Here I setup the AzureAD tenancy I will be using through rest of the course, you should setup one for yourself too.

04:15

Once you have setup AzureAD, what facilities does it offer, and where can you find them?

03:00

Here we add a test non-admin user in our tenancy, which we will use at various places in the course.

03:54

PowerShell enables you to script admin AzureAD and exposes numerous facilities not visible through the UI. Here I show how you can manage AzureAD (Office 365 included) using PowerShell

04:08

AzureAD and Office365 are joined at the hip. In this course, I will demonstrate concepts using both with and without Office365. So here we learn how to access the AzureAD behind Office365.

Section 6: Web Browsers accessing Web Applications secured by AzureAD
00:57

An explanation of what I mean by Web Browser accessing web applications secured using AzureAD

02:25

Understanding all those redirects and postbacks between browser and web application and AzureAD that make all this possible.

01:11

How web applications secured by AzureAD are supposed to handle expiring sessions and tokens.

02:32

Here we dive into a demo, where I write up a simple MVC application that we will protect using AzureAD

02:21

For every scenario there are some Nuget packages we will use. Here we add the nuget packages for securing a web application

07:11

Here we use the OWIN startup.cs to bootstrap authentication in our MVC application

08:08

We add functionality to allow the user to easily sign in and out using a web browser click into our web application.

05:40

We go through the process of registering our app in AzureAD portal and what information we need to provide.

01:42

We are able to run our web application running on-premises, authenticated by AzureAD and we are able to sign in and out.

02:16

Understanding how OpenID authentication works via browser posts, and the various parameters being passed.

Section 7: JavaScript SPA (single page app) accessing AzureAD protected APIs
01:46
An explanation of what I mean by "SPA", and what exactly will I be showing here
04:43

SPA's use a unique authentication protocol flow called OAuth2 Implicit Grant Protocol. Here we understand how that flow works, and it's unique strengths and limitations.

01:42

An introduction to the Active Directory Authentication Library for JavaScript

01:05

A deeper look into the limitations and strengths of the OAuth2 Implicit Grant Protocol.

00:58

SPAs accessing APIs protected by AzureAD do not have the luxury of using refresh tokens.What are refresh tokens? And what is a SPA supposed to do then?

02:01

How does a SPA using ADAL.js renew access tokens if it has no refresh tokens?

02:38

What differences does your application need to consider if it is a SPA accessing WebAPIs and it may need to work under either single tenant or multi tenant setups.

04:35

Here we dive into building an example demonstrating ADAL.js being used in SPAs accessing WebAPIs secured using AzureAD. The first step, is to build a sample API, without using any authentication to start with.

06:41

Nnext we use AngularJS to write up a simple application that attempts to access the WebAPI we just wrote. Remember there is no authentication involved yet.

04:30

Our SPA when trying to access the WebAPI fails because our WebAPI does not support CORS. Here we add support for CORS.

06:02

Our app should work without authentication at this point, so lets protect our WebAPI using AzureAD.

02:29

After adding AzureAD authentication support in code, lets register our WebAPI in AzureAD so AzureAD secures it.

01:28

Next we enhance our SPA to secure itself using AzureAD using ADAL.js. It's all about the access token at the end of the day.

01:09

Merely writing the code isn't enough, we also need to register it in AzureAD and enable that oAuth2 allow implicit flow thing.

01:14

The SPA won't be able to access the API unless it has permissions to do so. Here we set the permissions in AzureAD.

09:38

With our SPA registered and permissions granted, lets enhance our application to use ADAL.js to sign in/sign out and make authenticated calls.

02:24

With our application written, lets run it and examine how it works and how ADAL.js behaves at runtime.

01:15

The access token is just a JWT token. What information does it contain and how can we decrypt it? Do we need to validate it?

01:24

A behind the scenes look of how ADAL.js stores and manages sessions and access tokens etc.

Section 8: JavaScript SPA (single page app) accessing Microsoft Graph
02:38

What is the Microsoft Graph and what is it capable of?

05:02

We start by modifying the previous SPA we wrote in the previous section to instead target the Microsoft Graph.

01:29

We have written our SPA, but Office 365 needs to know about it, and maybe even trust it, plus there are those pesky permissions we need to worry about.

00:49

Just like our non-Office365 counterpart, we need to enable implicit flow here too.

00:53

Your app cannot call Microsoft graph unless you give it the rights to do so.

06:09

Our application running as a JavaScript SPA website successfully being able to call Microsoft Graph.

13:21

Why bother with AppParts when your pages can work as SPAs? We take the same SPA we wrote, and run it as a SharePoint page instead. Now I don't want to hear complaints about Office 365 doesn't have a good dev story.

Section 9: Native apps accessing AzureAD protected APIs
00:27

An explanation of what exactly do I mean by "Native app" and how is that different from what we have seen so far.

01:33

Native Apps use the OAuth 2.0 authorization code grant. So naturally we need to start by introducing this important player.

04:35

How do Native apps use the OAuth2.0 authorization code grant, and how is it uniquely different from JavaScript SPAs

01:54

Native app specific considerations when it comes to tenancy.

02:42

Lets start writing the native app talking to the web api, but we are going to need an Azure protected web api first. Lets get that out of the way first. This is shockingly simple as you'll see.

04:18

Next we add a native app into the project and set it's overall structure up. No authentication or AzureAD tie up yet.

01:13

Here we add some nuget packages that make it possible for our native WPF app to work with AzureAD

01:01

We also need some framework libraries to make https calls from a WPF app, so lets add references for those.

01:22

We reference the basic details we are going to get from AzureAD in our Native app

04:33

We are not using a browser, or are we? Why are redirect URIs important for native apps, and unique considerations for windows store apps.

09:13

Native Apps are unique that they are able to manage long term tokens (refresh tokens) securely using encrypted storage. What hooks does ADAL provide to allow us to manage tokens?

07:39

How do we make a sign in request, and how do we ensure that a signout is a full and secure signout?

04:12

After a successfull sign in, how do we get a hold of the access token, and how can we make an authenticated call to the service.

04:48

Demonstration of the application running with the sign in/sign out and authenticated call in action

Section 10: Native apps calling Office 365 Mail API
01:04

An explanation of what we are about to build here.

01:19

Hunting for interesting APIs and registering apps on dev.office.com. We look for the mail api.

00:57

For those not familiar with AzureAD, you can register various apps right on dev.office.com

02:16

Registering your native app in the AzureAD of Office365

03:39

Here we grant permissions to our app to read our mails, and run the app first without permissions, and second with permissions.

Section 11: Web App calling AzureAD secured APIs
02:22

Explanation of the scenarios I shall be covering here.

03:17

A web app calling an AzureAD secured WebAPI involves multiple moving parts and scenarios. Here I describe the specific authentication flows and protocols in use.

00:32

Description of web application calling web api using only Application Identity

02:28

Description of a web application calling a web api and sending the user identity along it's request using two different possible authentication protocols

Students Who Viewed This Course Also Viewed

  • Loading
  • Loading
  • Loading

Instructor Biography

Sahil Malik, Developer, Trainer, Consultant, Author

Sahil Malik is a developer and instructor who has been teaching developers for over 15 years and has worked in 17 countries and 5 continents. As an author of more than 20 books, recipient of the Microsoft MVP award for more than 10 years, and a consultant and trainer he knows how to make tough concepts easy to grasp and apply.

Sahil founded Winsmarts, LLC which provides consulting and training services on Web technologies such as JavaScript, Angular, ASP.NET, SharePoint, Office 365 and iOS. Sahil speaks at conferences around the world and writes columns for various technical magazines. Follow Sahil on twitter at @sahilmalik

Ready to start learning?
Take This Course