Azure Code Samples

Learn to interact with Azure services through code

13 code samples match your filter

Build a multi-tenant SaaS web application using Azure AD & OpenID Connect

A sample .NET 4.5 MVC web app that signs-up and signs-in users from any Azure AD tenant using OpenID Connect.

dstrockis by Danny Strockis,
Last updated: 11/22/2017

Build a multi-tenant SaaS web application that calls a web API using Azure AD

A sample .NET 4.5 MVC SaaS web app that signs-up and signs-in users from any Azure AD tenant, and calls the Azure AD Graph API.

jmprieur by Jean-Marc Prieur,
Last updated: 9/9/2017

Building a multi-tenant web API secured by Azure AD

A .NET 4.5 multi-tenant web API that is secured using Azure AD and OAuth 2.0 access tokens, and accepts calls from Azure AD users in any tenant via a Windows Store client.

jmprieur by Jean-Marc Prieur,
Last updated: 6/20/2017

Build a multi-tenant daemon with the v2.0 endpoint

A web application that sync's data from the Microsoft Graph using the identity of the application, instead of on behalf of a user.

jmprieur by Jean-Marc Prieur,
Last updated: 6/20/2017

Build a multi-tenant SaaS web application that calls a web API using Azure AD

An ASP.NET Core web application that authenticates Azure AD users from any tenant and calls a web API using OAuth 2.0 access tokens.

dstrockis by Danny Strockis,
Last updated: 3/16/2017

Authorization in a web app using Azure AD application roles & role claims

A .NET 4.5 MVC web app that uses Azure AD application roles for authorization.

jmprieur by Jean-Marc Prieur,
Last updated: 8/17/2017

Demo - To-do list reimagined web app

A demo web application that uses Azure AD for sign up & sign in and calls the Azure AD Graph API to search for users.

jmprieur by Jean-Marc Prieur,
Last updated: 6/20/2017

Build an app with admin restricted scopes using the v2.0 endpoint

An ASP.NET MVC application that shows how to use the Azure AD v2.0 endpoint to collect consent for permissions that require administrative consent.

jmprieur by Jean-Marc Prieur,
Last updated: 6/20/2017

.NET Native App accessing Web Service that calls a downstream Web API with Conditional Access

A .NET 4.5 MVC Web API protected by Azure AD that receives tokens from a client and uses ADAL to get tokens for calling a downstream web API with a Conditional Access policy applied to it.

jmprieur by Jean-Marc Prieur,
Last updated: 9/9/2017

Demo - To-do list reimagined iOS app

A demo iOS app that uses Azure AD for sign up & sign in and calls the Azure AD Graph API to search for users

jmprieur by Jean-Marc Prieur,
Last updated: 6/20/2017

Demo - To-do list reimagined admin web portal

A demo web application that syncs the app's local user store with users that have been assigned to the application in the directory.

jmprieur by Jean-Marc Prieur,
Last updated: 6/20/2017

Invoking an API protected by Azure AD from a text-only device

This sample demonstrates how to leverage ADAL .NET to authenticate user calls to a web API (in this case, the directory Graph) from apps that do not have the capability of offering an interactive authentication experience.

jmprieur by Jean-Marc Prieur,
Last updated: 6/20/2017

JavaScript Single Page Application with an ASP.NET backend, using msal.js

A JavaScript based single page app with a .NET backend that authenticates users for AzureAD, Microsoft personal and work accounts, and more, and calls the backend web api using access tokens, without using any Single Page Application framework

jmprieur by Jean-Marc Prieur,
Last updated: 6/20/2017