Azure Code Samples

Learn to interact with Azure services through code

64 code samples match your filter

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/27/2017

active-directory-dotnet-native-multitarget

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: 6/26/2017

Calling the Azure AD Graph API in a web application

A .NET 4.5 MVC web app that demonstrates how to query the Azure AD Graph API using the Azure AD Graph Client Library

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

Sign in Azure AD + MSA Users using Javascript Open Source Library

Demonstrates how you can use a third party library to build a Javascript application that signs in users and gets an Access Token for the Microsoft Graph.

navyasric by Navya Canumalla,
Last updated: 6/20/2017

Sign in Azure AD + MSA Users using Python-Flask Open Source Libraries

Demonstrates how you can use a third party library to build a Python-Flask application that signs in users and gets an Access Token for the Microsoft Graph.

navyasric by Navya Canumalla,
Last updated: 6/20/2017

Integrating Azure AD into a single page app

A javascript based single page app with a .NET backend that authenticates Azure AD users and calls the backend web api using access tokens, without using any SPA frameworks.

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

An iOS task application with Azure AD v2.0 using third party libraries

Demonstrates how you can use a third party library like nxoauth2 to build an iOS application that authenticates Microsoft identity users to our new v2 (converged) identity service and calls a web API using OAuth 2.0 access tokens.

brandwe by Brandon Werner,
Last updated: 6/20/2017

active-directory-android-native-oidcandroidlib-v2

Demonstrates how you can use a third party library like oidcandroidlib to build an Android application that authenticates Microsoft identity users to our new v2 (converged) identity service and calls a web API using OAuth 2.0 access tokens.

danieldobalian by Daniel Dobalian,
Last updated: 6/20/2017

Integrating an android app with Azure AD (Android API Level 18+)

An android app that uses Azure AD and the ADAL library for authenticating the user and calling a web API using OAuth 2.0 access tokens.

danieldobalian by Daniel Dobalian,
Last updated: 6/20/2017

Integrate Microsoft identity and the Microsoft Graph into a Xamarin forms app using MSAL

This is a simple Xamarin Forms app showcasing how to use MSAL to authenticate MSA and Azure AD via the converged MSA and Azure AD authentication endpoints, and access the Microsoft Graph with the resulting token.

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

Using ADAL for Android in Xamarin with bindings

This sample shows how to build a Xamarin binding to our native ADAL for Android library.

danieldobalian by Daniel Dobalian,
Last updated: 6/20/2017

Using ADAL for Objective-C in Xamarin using bindings

This sample shows how to build a Xamarin binding to our native ADAL for iOS library.

brandwe by Brandon Werner,
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

Integrate Microsoft identity and the Microsoft Graph into a web application using OpenID Connect

A sample showcasing how to develop a web application that handles sign on via the unified Azure AD and MSA endpoint, so that users can sign in using both their work/school account or Microsoft account. The sample also shows how to use MSAL to obtain a token for invoking the Microsoft Graph.

dstrockis by Danny Strockis,
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