Set up your Office 365 development environment

Last modified: March 24, 2015

Applies to: Office 365

Before you can create applications that use the Office 365 APIs, it's important to set up your Visual Studio environment. If you're using Visual Studio 2013, you can take advantage of the Office 365 API tools to access Office 365 right away.

Note If you develop apps for Office 365 in China, see API endpoints of Office 365 for China for the specification of the required URLs.

To set up your development environment, perform the steps described in this article.

1Get an Office 365Developer Site2Set up Azure AD foryour Developer Site3Install yourdeveloper tools Sorry, your browser does not support inline SVG.

Get an Office 365 Developer Site with preconfigured connections to Office 365

To use the Office 365 APIs, you need to have an Office 365 Developer Site. With a Developer Site, all the connection information is already configured for you, so you can get started quickly.

If you already have an Office 365 Developer Site

If you already have a Developer Site, you're set. The next step is to configure your Azure subscription to include your Office 365 account.

If you don't currently have an Office 365 Developer Site

If you don't have an existing Office 365 Developer Site, there are several ways to create one.


If you haveTo create your Developer Site
An MSDN subscriptionRedeem your Office 365 Developer Subscription benefit. This benefit is available to Visual Studio Ultimate and Visual Studio Premium with MSDN subscribers.
One of the following Office 365 subscription plans:

Office 365 Midsize Business

Office 365 Enterprise E1, E3, E4, or K1

Office 365 Education A2, A3, or A4

Office 365 Government G1, G3, G4, or K1

Create a Developer Site within your existing subscription. For details, see How to: Create a Developer Site within your existing Office 365 subscription.
Neither of the aboveStart with a free 30-day trial, or buy an Office 365 developer subscription (with one user license for either option). This subscription costs $99.00 per year.

Signing up for an Office 365 Developer Site

If you do have to sign up for a new Office 365 Developer Site, follow these instructions.

Tip We'll open each of these links in another window or tab to keep the following instructions handy.

This customized Office 365 subscription includes all the tools and resources you need to jump in and start building apps:

  • A SharePoint Online developer site, customized for creating and testing apps

  • Office Professional Plus 2013

  • Exchange Online

During signup, you're 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. Your SharePoint 2013 Developer Site is provisioned at your new domain: http:// yourdomain.sharepoint.com.

Note If you're logged on to another Microsoft account when you try to sign up for a developer account, 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 InPrivate Browsing and then fill out the form.

Figure 1. Office 365 Developer Site domain name

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

Note When you finish creating your apps and want to sign on to the Seller Dashboard and publish them to the Office Store, you use your individual Microsoft account (on the live.com domain) instead of the user ID that you created on your new Developer Site domain.

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

Figure 2. Office 365 admin center page

Screenshot of the Office 365 admin center showing the Build Apps link that you select to open your Developer Site, after your site is finished provisioning.

  1. You'll have to wait for your Developer Site to finish provisioning. After provisioning is complete, refresh the admin center page in your browser.

  2. Then, choose the Build Apps link in the upper left corner of the page to open your Developer Site. You should see a site that looks like the one in Figure 3.

    If you see a regular team site instead, wait a few minutes and launch your site again.

Figure 3. Your Developer Site home page

Screenshot that shows a Developer site home page.

Set up Azure Active Directory access for your Developer Site

To register and authenticate your applications, you need to use Microsoft Azure Active Directory. This is where application and user account information is stored. To get access to Microsoft Azure Active Directory, you need a Microsoft Azure tenant. A Microsoft Azure tenant gives you access to the management portal in Microsoft Azure, where you can add users, roles, and apps.

Fortunately, when you sign up for an Office 365 subscription, such as your Developer Site, an Microsoft Azure tenant is automatically created and associated with that Office 365 subscription.

So, if you can have an existing Microsoft Azure tenant, you can associate your Office 365 Developer Site with it. If not, you'll need to create a new subscription to the Azure tenant that was created when you signed up for your Office 365 subscription.

If you have an Azure tenant

If you have an existing Azure tenant, you can associate that with your Office 365 subscription.

To associate an existing Azure tenant with your Office 365 subscription

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

  2. Choose the Active Directory node, then choose the Directory tab and, at the bottom of the screen, choose Add. In the dialog box, choose Use existing directory, select the check box, and choose the check mark in the lower-right corner. This brings you back to the Azure Management Portal.

  3. Log on with your Office 365 subscription information. You will be prompted whether to use your directory with Azure.

  4. Choose continue and a screen comes up that confirms your action. Now, choose Sign out now.

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

  6. Log on again to your Azure subscription (for example, your Microsoft ID). Navigate to the Active Directory node and, under Directory, you should now see your Office 365 subscription.

If you don't have an Azure tenant

You can use the Azure tenant that was created when you created your Office 365 subscription to register and authenticate your apps. To access this underlying tenant from your Office 365 Admin Center, you'll need to create a subscription to your Azure tenant.

To create the Azure subscription to your Office 365 subscription

  1. Log on to your Office 365 tenant and go to the Office 365 admin center.

  2. In the same browser, open a new tab and sign in to Microsoft Azure by navigating to https://account.windowsazure.com/SignUp. You should log on with your Office 365 credentials.

  3. Create a new subscription.

  4. After you create your subscription, choose Portal.

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

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

Get your developer tools for working with the Office 365 APIs

You have several options for developing with Office 365 APIs, based on the developer environment you choose, and the type of solution you're building:

Install Visual Studio and the Office Developer Tools for Visual Studio

The quickest way to get started developing an app with the Office 365 APIs is to use Visual Studio 2013 and the Office Developer Tools for Visual Studio, which enable you to access Office 365 services easily.

The Office Developer Tools for Visual Studio 2013 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.

If you don't have Visual Studio 2013

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

To install the Office Developer Tools for Visual Studio 2013

If you have Visual Studio 2012

If you have Visual Studio 2012 installed, you can download and install the Office Developer Tools for Visual Studio 2012.

What's next?

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

Additional resources

Visual Studio development

Native development

Code

Reference