App Development using the Office 365 API – Part 1

Senthil Kumar / Wednesday, March 18, 2015

Office 365 is a collection of software and services that provides productivity software and related services to its subscribers. It includes server and client applications that allow users to experience a fully integrated Microsoft Office solution.

Not just for the end users, Microsoft Office 365 also provides a lot of opportunities for the developers to build applications that can consume the data stored in the cloud via the Office 365 API.

In this article, we'll introduce you to Office 365 from a developer perspective, and explore how developers can consume Office 365 data.

Office 365 for Developers

Developers can either extend Office products by building Office 2013 desktop apps, Office 2013 web apps or by building third party applications to consume the Office 365 Data.

Office 2013 Desktop or Web Apps include the Task Pane App, the Content App, and the Mail App.

With the Office 365 API, developers can build applications and websites using Office 365 data. Since the Office 365 API is based on the REST API, the target applications can range from native applications to Web applications running on Windows 8, iOS, Android, Windows Phone and Web Applications.

The REST API provides a more informed process for developing apps to consume Office 365 data and the process to connect and retrieve the data is pretty much uniform across all the platforms.

Almost all the types of programming languages or applications have a means to call REST services. This makes it easier for the developers working on the other platform to pretty much consume the Office 365 easily.

Office 365 uses Microsoft Azure Active Directory (AD) which manages the identity within the network and provides the users a single sign on experience for the apps. The Authentication and authorization from the API is handled using OAuth.

What does the Office 365 API provide?

The Office 365 API provides developers with options to access the following:

  • Mail
  • Contacts
  • Calendar
  • Discovery Services
  • Files

Image Source: Slide Presentation of Office 365 Development from MVA Academy

Some of the common operations that the Mail API provides include:

  • Reading messages.
  • Deleting messages.
  • Sending (Send, Reply, Reply All, Forward) messages
  • Working with attachments
  • Drafting messages
  • Moving or copying messages
  • Working with the email folders, and more.

Some of the common operations that the Calendar API provides include:

  • Reading events for the specified date range
  • Creating events
  • Deleting events
  • Editing events
  • Basic operations with the calendars and the calendar groups

Some of the common operations that the Contacts API provides are:

  • Reading the contacts
  • Searching for contacts
  • Creating/editing/deleting the contacts

The File API also provides the following functionalities as well:

  • Get the SharePoint client
  • Download and read files
  • Create files
  • Update file content
  • Delete files and folders
  • Get the list of files and folders
  • Copy files and folders

How to get started with the Office 365 API

To start building apps with the Office 365 API, it is important to setup the Office 365 Development Environment first.

If you're using Visual Studio, you need do the following:

  1. Download and Install the Visual Studio 2013 with the latest update
  2. Download and install the latest Office Developer Tools for Visual Studio 2013
  3. Get the Office 365 Developer Subscription and Office 365 Dev tenant
  4. Start Building your app with the Office 365 API

If you are an Android developer, you need to download and install the Android SDK for Office 365 to create Android apps.

If you are an iOS developer, you need to use the iOS SDK for Office 365 to create native iOS apps.

Developers working on other programming languages can call the Office 365 REST APIs directly using any development environment that is compatible with the REST.

It's also worth noting that you need an Office 365 Developer Subscription account to start using the features of Office 365 from your App. If you have an MSDN subscription, you can redeem your Office 365 Developer Subscription benefits. If you don't have an Office 365 account, you can start with the free 30-day trial account.

In order to start using the Office 365 API from your app, you will have to configure the Office 365 Developer site from your Office 365 Dev account. Once this is done, you have to include your Office 365 account to your Azure Subscription.

Stay tuned for our next post: App Development using the Office 365 API – Part 2!