Skip Navigation

Azure Code Samples

Learn to interact with Azure services through code

55 code samples match your filter

Build a serverless web app in Azure

Code for first serverless web application tutorial

antchu by Antchu,
Last updated: 9/24/2018

Migrating an application from using ADAL.NET to using MSAL.NET

Demonstrate the migration of .NET applications fro AAD v1.0 (ADAL.NET) to AAD v2.0 (MSAL.NET)

jmprieur by Jean-Marc Prieur,
Last updated: 9/22/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: 9/21/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: 9/17/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: 9/16/2018

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

Performing single sign out of all web apps using Azure AD

A web application (written in .NET 4.5) that shows how to perform single sign out from all Azure AD apps using OpenID Connect distributed sign out.

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

Integrating Azure AD V2 into an ASP.NET Core web app

An ASP.NET Core 2.x Web App which lets sign-in users with work and school or Microsoft personal accounts

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

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

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, as well as incrementental consent.

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

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: 8/29/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: 8/28/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: 8/24/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: 8/24/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: 8/24/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: 8/24/2018