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.
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 have||To create your Developer Site|
|An MSDN subscription||Redeem 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:||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 above||Start 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
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 email@example.com or firstname.lastname@example.org." 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
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
You'll have to wait for your Developer Site to finish provisioning. After provisioning is complete, refresh the admin center page in your browser.
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
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
Log on to the Microsoft Azure Management portal with your existing Azure credentials (for example, your Microsoft ID such as email@example.com), and navigate to the Active Directory node.
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.
Log on with your Office 365 subscription information. You will be prompted whether to use your directory with Azure.
Choose continue and a screen comes up that confirms your action. Now, choose Sign out now.
Close the browser and reopen the portal. Otherwise, you will get an access denied error.
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
Log on to your Office 365 tenant and go to the Office 365 admin center.
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.
Create a new subscription.
After you create your subscription, choose Portal.
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 to create .NET and hybrid (Xamarin and Apache Cordova) projects
Use the Android SDK for Office 365 to create Android apps
Use the iOS SDK for Office 365 to create native iOS apps
Call the Office 365 REST APIs directly using any REST-compatible development environment and language
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.
If you don't have Visual Studio 2013
If you don't have a version of Visual Studio installed, you can:
Get a 90-day free trial.
Install Visual Studio via your MSDN subscription.
If you qualify, download the full-featured free edition, Visual Studio 2013 Community.
Visual Studio 2013 Community is available if you're an individual developer, or part of a organization using Visual Studio in a classroom learning environment, for academic research, or for contributing to open source projects. Developers at non-enterprise organizations may qualify as well. For more information, please refer to the Visual Studio Community 2013 License Terms and the Visual Studio Licensing Whitepaper.
To install the Office Developer Tools for Visual Studio 2013
- Download and 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.
Now, you're ready to build and run your first app.
Visual Studio development
Try writing code against the Office 365 APIs using the API Sandbox