Developers now have the choice to call the Office 365 APIs from the server-side or client-side. This means developers can write single page applications, which have a better user experience and better performance, because they don’t have to proxy all their calls through a server-side façade service.
As we have said in the past, we are listening on all the channels we encourage you to participate on (UserVoice, Yammer, StackOverflow, Twitter). CORS support for the Office 365 APIs was taken as a high priority based on this feedback and we appreciate the communities support in providing the justifications for this. We encourage you to continue to provide this feedback for future feature requests.
Code example illustrating how easy it is to authenticate to the Office 365 API with client-side code using XMLHttpRequest().
To get started check out the documentation on MSDN published this week on supporting the CORS scenario.
Paving the way with the ADAL.JS v1.0 library
The Active Directory (AD) team made the ADAL.JS v1.0 library generally available on February 19th. This paved the way for the Office 365 APIs, which leverage AD authentication, to support CORS and take advantage of the ADAL.JS library.
Code example illustrating how easy it is to authenticate to the Office 365 API with client-side code using ADAL.JS and Angular Framework.
Vittorio Bertocci, from the Azure AD team, wrote a great blog post introducing the design concepts of ADAL.JS v1. Most business applications will have a server-side API component for user authentication into the web application itself for security reasons. The Azure AD team have three key samples that give guidance on how this can be implemented.
Code example illustrating how easy it is to fetch data from a SharePoint Lists with client-side code using the Angular framework, TypeScript and ADAL.JS.
Teams of developers also engaged in an Office hackathon—building Apps for Office in the IDE of their choice, which ran in Outlook and Excel in the browser. We are working hard to make sure the experience across IDEs, like Brackets, can easily be used to build solutions that extend the Office 365 platform.
Screenshot illustrating using the Brackets IDE to build Apps for Office calling the Office 365 API on Mac OS X.
There were 11 teams who competed in the hackathon. The teams had two hours to build their first app for Office in Outlook or Excel Online in OSX using Brackets IDE. The judges, (Dan Wahlin, Andrew Connell, Sean Laberee, Rob Howard, Venkat Ayyadevara and Jeremy Thake), selected three winning teams. All team participants won a JamBox Mini and the winnings team participants each won an Xbox One.
- The first team of four people built an Outlook Compose app that injected a 1 pixel by 1 pixel tracking image and used the keen.io to monitor who read the emails. They also built an Outlook Read app, which showed the information from keen.io on how many had read the mail and when.
- The second team of two people built an Excel Content app, which read data binded into the sheet and used the D3.JS framework to show some cool visualizations of the data.
- The third team of one person built an Outlook Read app, which took the body of the email and used Bing Translator to translate it to the users selected language.
The API Sandbox
Visit the API Sandbox to gain hands on experience using the browser-based method to execute snippets of code to show how the API works.
We have hosted many of the engineering team involved in the Office 365 APIs on the weekly “Office 365 Developer Podcast.” Check out shows with Brian Jones, Chakkaradeep Chandran, Rob Howard, Mauricio Ordonez and Matthias Leibmann.
- Office 365 Dev center
- Office 365 Dev blog
- Office 365 Dev Twitter
- Office 365 Dev Facebook
- Yammer Office 365 Technical Network