Skip Navigation

Azure Code Samples

Learn to interact with Azure services through code

54 code samples match your filter

Calling a Web API in a daemon app or long-running process

A Windows console application that calls a web API using its app identity (instead of a user's identity) to get access tokens in an unattended job or process.

jmprieur by Jean-Marc Prieur,
Last updated: 6/15/2018

Azure AD Javascript Getting Started

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/14/2018

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: 6/13/2018

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/1/2018

Calling a ASP.NET Core Web API from a WPF application using Azure AD V2

Calling a ASP.NET Core Web API from a WPF application using Azure AD V2

jmprieur by Jean-Marc Prieur,
Last updated: 5/28/2018

Build a multi-tenant daemon with the Azure AD 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: 5/25/2018

Authenticating to Azure AD in daemon apps with certificates

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

jmprieur by Jean-Marc Prieur,
Last updated: 5/14/2018

Calling Microsoft Graph from a web app using ADAL Python

A Python Web App calling the Microsoft Graph API, leveraging ADAL Python

abpati by Ab,
Last updated: 5/11/2018

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 the MIcrosoft Graph

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

Integrating Azure AD into a Java web application

A server app that uses Azure AD and the ADAL4J library for authenticating the user and calling a web API using OAuth 2.0 access tokens.

sagonzal by Sergio Alejandro González,
Last updated: 5/4/2018

Integrating Azure AD into a Java console application using username and password

A java command line program for Windows, Linux, or OS X that demonstrates non-interactive authentication to Azure AD using a username & password.

xerners by Brandon Werner,
Last updated: 5/4/2018

.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: 5/4/2018

Manually validating a JWT access token in a web API

How to manually process a JWT access token in a web API using the JSON Web Token Handler For the Microsoft .Net Framework 4.5.

jmprieur by Jean-Marc Prieur,
Last updated: 5/4/2018

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 Microsoft Graph API using OAuth 2.0 access tokens.

jmprieur by Jean-Marc Prieur,
Last updated: 5/4/2018

Authenticating to Azure AD non-interactively using a username & password or Windows Integrated Authentication

A windows desktop program that demonstrates non-interactive authentication to Azure AD using a username & password, and optionaly windows integrated authentication.

jmprieur by Jean-Marc Prieur,
Last updated: 5/4/2018

Integrating Azure AD into a Windows desktop application using interactive authentication

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: 5/4/2018

Calling a ASP.NET Core Web API from a WPF application using Azure AD

A WPF application that calls a Web API running on ASP.NET Core 2.0 protected by Azure AD using OAuth 2.0 access tokens.

jmprieur by Jean-Marc Prieur,
Last updated: 5/4/2018

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: 5/4/2018