NOTE: this sample is outdated. The technology, methods and interface instructions have been replaced with newer features. To see an updated app that builds a similar app, please see:

Please visit for a complete list of new sample applications for Azure Active Directory.


Windows Azure Active Directory (Windows Azure AD) is a modern, REST-based service that provides identity management and access control capabilities for cloud applications. Windows Azure AD easily integrates with cloud services as well as Windows Azure, Microsoft Office 365, Dynamics CRM Online, and Windows Intune. Existing on-premise Active Directory deployments can also take full advantage of Windows Azure AD. To learn more visit

Integrating with Windows Azure AD allows your customers to sign up and sign in to your application using an identity management system that they already maintain, which reduces or eliminates the need to do separate identity management tasks with your application. This functionality gives your customers a more seamless experience when using your application, and it frees up the time spent doing management tasks.

This sample application is intended for .NET developers who want to integrate a multi-tenant application with Windows Azure Active Directory, and is the result of the published walk-through series available from   The walk-through will step you through each of the following capabilities - the end result of completing the walk-through's, is this sample application:

1. Enable single sign-on (SSO) with Windows Azure AD

2. Access Azure Active Directory Data using the Windows Azure AD Graph API.

3. Make your application a multi-tenant application, and allow customers to sign up to use this application, using both  single sign-on with their Organization Identifies, and accessing directory data from the Graph API. 

Review the detailed walk-through to configure, build and run this sample application:  The sample application’s web configuration files is configured to be used with a demonstration company. To run the app with your company, it must be re-configured with your Client ID, Client Key and Tenant Domain, which is the result of registering and configuring your application in the Azure AD Management Portal – the detailed walk through explains how to acquire these credentials and how to configure your application.  You may need to change your port assignment in Visual Studio when you run the application from your development environment. 

NOTE: The multi-tenant directory app sample is provided for illustration purposes only.

Building the Sample Application

The following prerequisites are required to build the sample application:


Running Sample Application

This sample app is built to work with a pre-configured demonstration company. After downloading, press F5 to build and run it. Select "continue" if you see a " security certficate.." warning for this demo app.  Click "Sign In" and use the following demo credentials:  


Password: graphDem0

After successful authentication, select "Users" from the top menu to see how the application access the Graph API, and retrieves a list of users from the demo company.

More Information and Resources