Azure Code Samples

Learn to interact with Azure services through code

53 code samples match your filter

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

azure-samples by Azure Samples,
Last updated: 4/18/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: 4/16/2018

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: 4/16/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: 4/13/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: 4/11/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: 4/11/2018

Universal Windows Platform application signing in users with Microsoft and calling the Microsoft Graph

A Windows Universal Platform client application using msal.net, accessing the Microsoft Graph for a user authenticating with Azure AD V2 endpoint

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

Sign in Azure AD + MSA Users using 3rd Party JavaScript OAuth Library (Hello.js)

A Javascript application that uses a third party OAuth library(hello.js) to sign in users and gets an access token for the Microsoft Graph.

navyasric by Navya Canumalla,
Last updated: 4/10/2018

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

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

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