Azure Code Samples

Learn to interact with Azure services through code

66 code samples match your filter

Integrating Azure AD into a Windows desktop application

A .NET 4.5 WPF application that authenticates a user and calls web API using Azure AD and OAuth 2.0 access tokens.

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

Integrating Azure AD into an ASP.NET Core web app

An ASP.NET Core web application that signs-in Azure AD users from a single Azure AD tenant.

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

Call the Azure AD Graph API from a native client

A .NET console application that performs various queries against the Azure AD Graph API using both user identities and application identities.

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

Node.js Web API with Azure AD v2.0

A small Node.js Web API that works with Azure AD v2.0 to accept and validates access tokens.

navyasric by Navya Canumalla,
Last updated: 9/22/2017

Integrating Azure AD into a cross platform Xamarin application

A Xamarin application that signs users in with Azure Active Directory across several different platforms and calls the Azure AD Graph API using OAuth 2.0 access tokens.

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

WPF application signing in users with Microsoft and calling the Microsoft Graph

Sample showing how a windows Desktop .NET (WPF) application can get an access token using MSAL.NET and call the Microsoft Graph API or other APIs protected by Azure Active Directory v2

jmprieur by Jean-Marc Prieur,
Last updated: 9/10/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

.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

Calling a downstream web API from a web API using Azure AD

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 another downstream web API

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

Call an Azure AD protected Web API in an AngularJS Single Page App

An AngularJS single page app, implemented with an ASP.NET Web API backend, that signs users in using Azure AD and calls another web API using OAuth 2.0 access tokens.

jmprieur by Jean-Marc Prieur,
Last updated: 9/9/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

Integrating Azure AD into an AngularJS single page app

An AngularJS based single page app, implemented with an ASP.NET Web API backend, that signs in users and calls web APIs using Azure AD

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

Using the Graph API Reporting Features

A web application sample that calls the Azure AD Graph API reporting capabilities

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

Using Azure AD Graph API directory extensions in a PHP web app

A PHP web application that calls the Graph API to register new directory extensions and manipulate the extension properties

brandwe by Brandon Werner,
Last updated: 4/28/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

Integrating Azure AD (v2.0 endpoint) into an ASP.NET Core web app

An ASP.NET Core web application that signs-in users with Microsoft Accounts and Azure AD Accounts from multiple Azure AD directories

dstrockis by Danny Strockis,
Last updated: 6/20/2017

Authenticating to Azure AD in daemon apps with certificates

A .NET core daemon application that uses a certificate to authenticate with Azure AD and get OAuth 2.0 access tokens to a .NET core web api

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

Calling a web API in a web app using Azure AD and OpenID Connect

A .NET 4.5 MVC web app that signs Azure AD users in with OpenID Connect and calls a web api using OAuth 2.0 access tokens.

dstrockis by Danny Strockis,
Last updated: 6/30/2017