Skip Navigation

Azure Code Samples

Learn to interact with Azure services through code

59 code samples match your filter

Integrate Azure AD into a web application using OpenID Connect

A .NET MVC web application that uses OpenID Connect to sign-in users from a single Azure Active Directory tenant.

jmprieur by Jean-Marc Prieur,
Last updated: 2/18/2019

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: 2/18/2019

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: 2/16/2019

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: 2/15/2019

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: 2/15/2019

A .NET Core 2.x simple daemon console application calling the graph with its own identity

A .NET Core 2.x simple daemon console application calling the graph with its own identity

jmprieur by Jean-Marc Prieur,
Last updated: 2/13/2019

Calling Azure AD protected web APIs in a web app using OAuth 2.0

In the sample, an existing web app with its own way of signing in users adds the ability to call an Azure AD protected web API using OAuth 2.0 access tokens.

jmprieur by Jean-Marc Prieur,
Last updated: 2/13/2019

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: 2/11/2019

.NET Core Console application letting users sign-in with Username/password to call Microsoft Graph API

A .NET Core 2.1 console application which gets an access token to call the graph using a username and password

jmprieur by Jean-Marc Prieur,
Last updated: 2/11/2019

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: 2/11/2019

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: 2/9/2019

.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: 2/9/2019

Calling a web api using an application identity

A .NET 4.5 MVC web app that uses Azure AD for sign-in and calls a web API under the application's identity, instead of the user's identity

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

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: 2/9/2019

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: 2/9/2019

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: 2/9/2019

Build a multi-tenant SaaS web application using Azure AD & OpenID Connect

A sample .NET 4.5 MVC web app that signs-up and signs-in users from any Azure AD tenant using OpenID Connect.

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

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: 2/9/2019