Skip to content
Brandon Werner edited this page Jan 30, 2014 · 20 revisions

#Windows Azure Active Directory Wiki

This package will give you with a quick and easy way to set up your first iOS app that's integrated with Windows Azure Active Directory. The sample apps included in download are designed to run on any platform. It also provides libraries so you can build your own node.js REST API with Client Credential flow to protect endpoints.

By the end of these walkthroughs, you should be able to build a running HTTP server with the following features:

  • A node.js server running an REST API interface leveraging OAuth2 Client Credential flows against Windows Azure Active Directory
  • A registered application inside of Windows Azure Active Directory that allows your sample company to authenticate against the REST API you built.
  • A iOS application leveraging the Windows Azure Active Directory SDK for iOS to access this REST API uisng Windows Azure AD

We've released all of the source code for this running example in GitHub under an Apache 2.0 license, so feel free to clone (or even better, fork!) and provide feedback on the forums.

Quick Start

The sample consist of two pieces:

  • A node.js Server that exposes a simple Task REST API for your application to use. This leverages Windows Azure Active Directory OAuth2 to protect its APIs.
  • A iOS Task Application that accesses the REST API and leverages the iOS SDK for authentication using OAuth2.

1. Download the ADAL for iOS SDK

You can grab the SDK for iOS by doing the following:

git clone git@github.com:MSOpenTech/azure-activedirectory-library-for-ios.git

The sample is located under the /Samples folder and is called "iOS Task Application"

2. Launch the iOS Task Application in XCode

You can click on the Windows Azure Active Directory iOS Sample App.xcodeproj file to launch the application.

3. Download and run the sample TOOD REST API server

You can grab the TODO server by doing the following:

git@github.com:WindowsAzureAD/Azure-AD-TODO-Server-Sample-For-Node.git

The application is in the /node-server directory. For setup instructions please refer to the readme.md that is included in the download. You will need to have Mongo installed on your development machine.

4. Register your appication with Windows Azure Active Directory

You will need to register your REST API server with your Windows Azure Active directory tenant in order for the application to work. Please follow the steps outlined in the walkthrough here to register your server.

5. Configure your iOS Task Application

Using the information you got from #4, fill in the appropriate values in to the Constants.m file in the iOS Task Application sample

6. Run the application and click the "logon" button

The application will call the correct endpoints and orchestrate a flow.

Detailed Information

About The Code

Code hosted on GitHub under Apache 2.0 license

Acknowledgements