Azure Code Samples

Learn to interact with Azure services through code

62 code samples match your filter

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.

dstrockis by Danny Strockis,
Last updated: 3/23/2017

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.

dstrockis by Danny Strockis,
Last updated: 3/16/2017

Calling web APIs in a daemon 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.

dstrockis by Danny Strockis,
Last updated: 3/16/2017

Call an Azure AD protected Web API in an AngularJS Single Page App

An AngularJS single page app, implemented with an ASP.NET Web API backend, that signs users in using Azure AD and calls another web API using OAuth 2.0 access tokens.

dstrockis by Danny Strockis,
Last updated: 3/16/2017

Integrating Azure AD into an AngularJS single page app

An AngularJS based single page app, implemented with an ASP.NET Web API backend, that signs in users and calls web APIs using Azure AD

dstrockis by Danny Strockis,
Last updated: 3/16/2017

Build a multi-tenant SaaS web application that calls a web API using Azure AD

An ASP.NET Core web application that authenticates Azure AD users from any tenant and calls a web API using OAuth 2.0 access tokens.

dstrockis by Danny Strockis,
Last updated: 3/16/2017

Integrating Azure AD into a single page app

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.

dstrockis by Danny Strockis,
Last updated: 3/16/2017

Integrating a Windows Universal application with Azure AD

A Windows Store 8.1 application that uses Azure AD and the ADAL library to authenticate the user and call a web API using OAuth 2.0 access tokens.

dstrockis by Danny Strockis,
Last updated: 3/16/2017

Integrating a Windows Phone application with Azure AD

A Windows Phone 8.1 application that authenticates Azure AD users and calls a web API using OAuth 2.0 access tokens.

dstrockis by Danny Strockis,
Last updated: 3/16/2017

Integrating a web app with Azure AD using WS-Federation

A .NET MVC web application that uses WS-Federation to sign-in users from a single Azure Active Directory tenant, using the ASP.Net WS-Federation OWIN middleware.

dstrockis by Danny Strockis,
Last updated: 3/16/2017

Calling a web API in an ASP.NET Core web application using Azure AD

An ASP.NET Core web application that authenticates Azure AD users and calls a web API using OAuth 2.0 access tokens.

dstrockis by Danny Strockis,
Last updated: 3/16/2017

Calling a web API in a web app using Azure AD and OpenID Connect

A .NET 4.5 MVC web app that signs Azure AD users in with OpenID Connect and calls a web api using OAuth 2.0 access tokens.

dstrockis by Danny Strockis,
Last updated: 3/16/2017

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.

dstrockis by Danny Strockis,
Last updated: 3/16/2017

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

dstrockis by Danny Strockis,
Last updated: 3/16/2017

Build a multi-tenant SaaS web application that calls a web API using Azure AD

A sample .NET 4.5 MVC SaaS web app that signs-up and signs-in users from any Azure AD tenant, and calls the Azure AD Graph API.

dstrockis by Danny Strockis,
Last updated: 3/16/2017

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.

dstrockis by Danny Strockis,
Last updated: 3/16/2017

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.

dstrockis by Danny Strockis,
Last updated: 3/16/2017

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.

dstrockis by Danny Strockis,
Last updated: 3/16/2017