Set up your Office 365 development environment

Last modified: July 20, 2015

Applies to: Office 365

Before you can create applications that access the Office 365 APIs, you'll need to set up your developer environment. This consists of three one-time tasks to make sure you've got the tools and environment to be successful:

  1. Download the developer tools you'll be using to create your apps.
  2. Get an Office 365 for business account, to access the Office 365 APIs.
  3. Associate your Office 365 account with Azure AD, so you can create and manage apps.

Install iOS developer tools for building your app

Not developing iOS apps? Use the control in the upper right corner to select the type of app you're developing.

You use Xcode to develop iOS apps. See Get the tools in Start Developing iOS Apps Today for more details.

You can use the Office 365 SDK for iOS to develop iOS apps that access the Office 365 APIs. To more easily integrate the SDK into your app, you can use the CocoaPods dependency manager. CocoaPods is based on Ruby, and is available with the default Ruby install on OS X. Prior to using Cocoapods for the first time, you need to run the following two commands from Terminal to install and set up the environment for Cocoapods, so that it is available to use for you Xcode projects:

sudo gem install cocoapods
pod setup

If the install and setup were successful, you should see the message Setup completed in Terminal.

Note: These commands only needs to be run once.

Install Android developer tools for building your app

Not developing Android apps? Use the control in the upper right corner to select the type of app you're developing.

You have two choices for Android development, Android Studio or the Android Developer Tools including Eclipse. The two are similar, but Android Studio takes advantage of Gradle support to manage the library dependencies that you have to manage by hand when you use Eclipse.

Install JavaScript developer tools for building your app

Not developing JavaScript web apps? Use the control in the upper right corner to select the type of app you're developing.

You can write JavaScript in many different IDEs and since none provide a significant advantage for developing with the Office 365 APIs, choose your favorite and get started. Brackets, Sublime Text, WebStorm, and Visual Studio are popular choices.

You don't need any other tools to develop JavaScript applications using the Office 365 APIs. However, if you are following the Getting started with Office 365 APIs in Web Applications (JavaScript) tutorial, you'll need to install a couple additional utilities to download and configure the sample, including Git and Node.js.

Install Visual Studio developer tools for building your app

Not developing apps with Visual Studio? Use the control in the upper right corner to select the type of app you're developing.

The Office Developer Tools for Visual Studio include client libraries and UI enhancements to Visual Studio. The client libraries make it easier for you to interact with the Office 365 REST APIs from the device or platform of your choice by using libraries available for .NET Framework and JavaScript. The Visual Studio UI enhancements make it easy to add Office 365 services to your app projects.

Install the Office Developer Tools for Visual Studio.

If you don't have Visual Studio

If you don't have a version of Visual Studio installed, you can:

Get an Office 365 account to access Office 365 APIs

To access Office 365 APIs such as mail, contacts, calendar, and files, you need to have an Office 365 business account with global administrator privileges.

This can be one of the following plans:

  • Office 365 Midsize Business
  • Office 365 Enterprise E1, E3, E4, or K1
  • Office 365 Education A2, A3, or A4
  • Office 365 Developer

If you already have an Office 365 for business account

If you already have one of the Office 365 accounts listed above, you're set. The next step is to associate your Office 365 account with an Azure AD subscription, so you can create and manage apps that use the Office 365 APIs.

If you don't currently have an Office 365 for business account

If you don't have an existing Office 365 for business account, you can:

Signing up for an Office 365 Developer account

If you have an MSDN subscription,redeem your Office 365 Developer account benefit. This benefit is available to Visual Studio Ultimate and Visual Studio Premium with MSDN subscribers.

Otherwise, start with a free 30-day trial, or buy an Office 365 Developer account (with one user license for either option). This account costs $99.00 per year.

When you sign up for a new Office 365 Developer account, follow these instructions.

During signup, you'll be asked to supply a subdomain of .onmicrosoft.com and a user ID to assign to the domain that you're creating, as shown in Figure 1. After signup, you have to use the resulting userid (in the format userid@yourdomain.onmicrosoft.com) to sign in to your portal site where you administer your account.

Note If you're logged on to another Microsoft account when you try to sign up for a Developer subscription, you might get this message: "Sorry, that user ID you entered didn't work. It looks like it's not valid. Be sure you enter the user ID that your organization assigned to you. Your user ID usually looks like someone@example.com or someone@example.onmicrosoft.com." If you see this message, log out of the Microsoft account you were using and try again. If you still get the message, clear your browser cache or switch to a private browser session and then fill out the form.

Figure 1. Office 365 Developer account domain name

During signup to create your Office 365 Developer subscription, you're asked to supply a unique subdomain of .onmicrosoft.com and a user ID.

After you finish the signup process, your browser opens the Office 365 installation page. Choose the Admin icon to open the admin center page.

Associate your Office 365 account with Azure AD to create and manage apps

To authenticate your applications, you need to register them in Microsoft Azure Active Directory (Azure AD). This is where Office 365 user account and application information is stored. To manage Azure AD through the Azure Management Portal, you need a Microsoft Azure subscription. Using the management portal in Microsoft Azure enables you to manage users, roles, and apps.

To associate an existing Azure subscription with your Office 365 account

  1. Log on to the Microsoft Azure Management portal with your existing Azure credentials (for example, your Microsoft ID such as user@live.com).

  2. Select the Active Directory node, then select the Directory tab and, at the bottom of the screen, select New.

  3. On the New menu, select Active Directory > Directory > Custom Create.

  4. In Add directory, in the Directory drop-down box, select Use existing directory. Check I am ready to be signed out, and then select the check mark in the lower-right corner.

    This brings you back to the Azure Management Portal.

  5. Log in with your Office 365 account information.

    You will be prompted whether to use your directory with Azure.

    Important To associate your Office 365 account with Azure AD, you'll need an Office 365 business account with global administrator privileges.

  1. Select continue, and then Sign out now.

  2. Close the browser and reopen the portal. Otherwise, you will get an access denied error.

  1. Log on again with your existing Azure credentials (for example, your Microsoft ID such as user@live.com). Navigate to the Active Directory node and, under Directory, you should now see your Office 365 account listed.

To create a new Azure subscription and associate it with your Office 365 account

  1. Log on to Office 365. From the Home page, select the Admin icon to open the Office 365 admin center.
  2. In the menu page along the left side of the page, scroll down to Admin and select Azure AD.

    Important To open the Office 365 admin center, and access Azure AD, you'll need an Office 365 business account with global administrator privileges.

  3. Create a new subscription.

    If you're using a trial version of Office 365, you'll see a message telling you that Azure AD is limited to customers with paid services. You can still create a trial 30-day Azure subscription at no charge, but you'll need to perform a few extra steps:

    1. Select your country or region, and then click Azure subscription.
    2. Enter your personal information. For verification purposes, enter a telephone number at which you can be reached, and specify whether you want to be sent a text message or called.
    3. Once you've received your verification code, enter it and click Verify code.
    4. Enter payment information, check the agreement, and select Sign up.

      Your credit card will not be charged.

      Do not close or refresh your browser while your Azure subscription is being created.

  4. Once your Azure subscription is created, choose Portal.

  5. The Azure Tour appears. You can view it, or choose X to close it.

    You should now see all items in your Azure subscription. It lists a directory with the name of your Office 365 tenant.

Next steps

Now, you're ready to build and run your first app.

Next steps

Now, you're ready to build and run your first app.

Next steps

Now, you're ready to build and run your first app.

Next steps

Now, you're ready to build and run your first app.

Additional resources