Azure Code Samples

Learn how to interact with Azure services through code

112 code samples match your filter

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.

  • Azure Active Directory
  • .NET
jmprieur by Jean-Marc Prieur,
Last updated: 21/09/2019

Use OpenID Connect to sign in users to Microsoft identity platform (formerly Azure Active Directory for developers) and execute Microsoft Graph operations using incremental consent

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.

  • Azure Active Directory
  • .NET
jmprieur by Jean-Marc Prieur,
Last updated: 14/09/2019

Authorization in a web app using Azure AD groups & group claims

A .NET 4.5 MVC web app that uses Azure AD groups for authorization.

  • Azure Active Directory
  • .NET
jmprieur by Jean-Marc Prieur,
Last updated: 12/09/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.

  • Azure Active Directory
  • .NET
jmprieur by Jean-Marc Prieur,
Last updated: 02/09/2019

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

  • Azure Active Directory
  • .NET
jmprieur by Jean-Marc Prieur,
Last updated: 27/08/2019

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.

  • Azure Active Directory
  • .NET
jmprieur by Jean-Marc Prieur,
Last updated: 19/08/2019

Analytics & Visualization Samples for Academic Graph

Various examples to perform big data analytics over Microsoft Academic Graph and visualize the results.

  • .NET
alch-msft by Alvin Chen,
Last updated: 14/08/2019

Use Service Bus from App Service with Managed Service Identity

Sample that shows how to send and receive data from Azure Service Bus Queue at run-time from an App Service with a Managed Service Identity (MSI)

  • App Service
  • .NET
nonik0 by Nick Brown,
Last updated: 14/08/2019

Use Azure SQL Database from App Service with Managed Identity (Without Code Changes)

Sample that shows how to authenticate to Azure SQL Databases at run-time from an App Service with a Managed Service Identity.

  • App Service
  • .NET
nonik0 by Nick Brown,
Last updated: 14/08/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.

  • Azure Active Directory
  • .NET
jmprieur by Jean-Marc Prieur,
Last updated: 23/07/2019

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.

  • Azure Active Directory
  • .NET
jmprieur by Jean-Marc Prieur,
Last updated: 17/07/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.

  • Azure Active Directory
  • .NET
jmprieur by Jean-Marc Prieur,
Last updated: 17/07/2019

How to manually validate a JWT access token using Microsoft identity platform (formerly Azure Active Directory for developers)

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.

  • Azure Active Directory
  • .NET
kalyankrishna1 by Kalyan Krishna,
Last updated: 05/07/2019

Using the Graph API Reporting Features

A web application sample that calls the Azure AD Graph API reporting capabilities

  • Azure Active Directory
  • .NET
jmprieur by Jean-Marc Prieur,
Last updated: 20/06/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.

  • Azure Active Directory
  • .NET
jmprieur by Jean-Marc Prieur,
Last updated: 20/06/2017

How to use SQLite Encryption Extension with Azure Mobile Apps

Sample encrypted local store for Azure Mobile Apps client SDK

  • .NET
  • Xamarin
pragnagopa by Pragna Gopa,
Last updated: 15/07/2016

Azure Storage Queue Service - Quick Sample using Pop Receipt and Face API

Azure Queue Service Pop Receipt Sample with Image Upload and Face Recognition using Face API from Azure Cognitive Services

  • Storage Accounts
  • Cognitive Services
  • .NET
seguler by Sercan Guler,
Last updated: 07/06/2018

Getting Started with Azure Client Side Encryption in .NET

This sample demonstrates how to use client side encryption along with Azure Key Vault integration

  • Storage Accounts
  • .NET
woodp by Pedro Wood,
Last updated: 14/12/2016