Next Generation Office 365 Development with APIs and Add-ins
This week at //build, Microsoft made a number of exciting announcements regarding Office 365 development. If you haven’t had a chance, I highly encourage you to watch the foundational keynote that Jeremy Thake and Rob Lefferts delivered on the opening day…it was epic. In the months leading up to //build, I had the pleasure of working with Do.com on a solution to showcase many of the new Office 365 extensibility investments. I thought I’d give my perspective on working with the new extensibility options in Office 365 and how we applied them to Do.com (a solution already richly integrated with Office 365). I’ll break my thoughts down into “Next Generation Add-ins” and “New and Unified APIs”. But first, here is the prototype of the Do.com Outlook add-in that uses a number of the new announcements.
[View:https://www.youtube.com/watch?v=IcBix75IqlE]
NOTE: You should really checkout Do.com if you haven’t already. I really hate senseless and unorganized meetings, which Do.com has helped me reduce. The video above is a prototype, but they already have a great site and mobile apps that integrate nicely with Office 365 and an aggressive vision for more integration. |
Next Generation Add-ins
This week we demonstrated Office apps running within the iPad Office clients. This was an exciting announcement that confirms Microsoft’s commitment to Office extensibility and “write-once run anywhere”. However, it also set off some concerns that an “app within app” could be confusing (if the term “app” wasn’t confusing enough already). Moving forward, these extensions to the Office experience will be called “add-ins” (a term we hope more people can relate to).
Office Add-in in Office for iPad
We also announced a new type of add-in called an “add-in command”. Add-in commands are custom commands pinned to the Office user experience to perform custom operations. An add-in command might launch a full add-in for the user to interact with or just perform some background process (similar to Outlook’s “mark as read”). The first generation add-in commands are concentrated to the ribbon (an area developers want to target and on-par with VSTO solutions). At //build we showcased a Do.com task pane add-in launched from the Outlook ribbon (task pane read add-ins are also new). For Do.com, an add-in command provided more visibility to their add-in and brand from within Outlook (especially compared to previous mail add-ins). Checkout the presence of the Do.com logo in the Outlook ribbon.
Do.com Outlook add-in via add-in command
Speaking of Outlook add-ins, we also announced that the same Outlook add-ins built for Office 365 and Exchange Server will be able to target the 400 million users of Outlook.com. This is just one example of unification efforts across consumer and commercial Microsoft services. If you build for Office, you could have a HUGE customer audience!
New and Unified APIs
APIs have been a significant investment area for Office 365 extensibility. About a year ago, Microsoft announced the preview of the Office 365 APIs. Since that time, the APIs have graduated to general availability and added several new services. At //build we announced perhaps our most strategic move with these APIs…unifying them under a single end-point (https://graph.microsoft.com).
Why is the Office 365 Unified API end-point so significant? Most of the services in Office 356 offer APIs, but they have traditionally been resolved under service-specific or even tenant-specific end-points. For tenant-specific end-points like SharePoint/Files, the Discovery Service had to be leveraged just to determine where to make API calls. Although 3rd party apps could provide a single sign-on experience across all the Office 365 services, resource-specific access tokens had to be request behind the scenes. Both the Discovery Service and token management made first-gen Office 365 apps chatty. The Office 365 Unified API end-point solves both these challenges by eliminating the need for the Discovery Service and providing a single access token that can be used against any service that falls under the unified end-point.
Consider Do.com, which needed access to Azure AD (for first/last name), Exchange Online (for high-res profile picture), and OneNote in Office 365 (for exporting agendas). The table below compares the flow with and without the Office 365 Unified API end-point:
w/ O365 Unified API End-Point | w/o O365 Unified API End-Point |
---|---|
1. Get Access Token for the resourcehttps://graph.microsoft.com (O365 Unified API End-Point) | 1. Get Access Token for the resourcehttps://api.office.com/discovery/ (Discovery Service) |
2. Use the Unified API end-point to get users properties (first/last name and manager):https://graph.microsoft.com/beta/me | 2. Call Discovery Service to get users capabilities:https://api.office.com/discovery/v1.0/me/ |
3. Use Unified API end-point to get the users high-res profile picture from Exchange Online:https://graph.microsoft.com/beta/me/userPhoto/$value | 3. Get Access Token for the resourcehttps://graph.windows.net (Azure AD Graph) |
4. Use the Unified API end-point to get the users notebooks in Office 365*:https://graph.microsoft.com/beta/me/notes/notebooks | 4. Call Azure AD Graph to get user properties (first/last name and manager): https://graph.windows.net/me |
5. Get Access Token for the resourcehttps://outlook.office365.com (Exchange Online) | |
6. Call Exchange Online to get the user’s high-resolution profile picture:https://outlook.office365.com/api/beta/me/userphoto/$value | |
7. Get Access Token for the resourcehttps://onenote.com/ (OneNote in Office 365) |
|
8. Call OneNote API to get the users notebooks in Office 365:https://www.onenote.com/api/beta/me/notes/notebooks |
* OneNote APIs for Office 365 were announced this week, but the unified end-point won't be live until a future date
Hopefully this illustrates the significance of unification. Oh and by the way…the Office 365 Unified API end-point also supports CORS from day one (#HighFiveRedmond).
The Microsoft Unified API wasn’t the only exciting API announcement made at //build. We also announced a number of completely new services, permissions to existing services, and SDKs:
- SharePoint Online (new permissions for User Profiles, Managed Metadata, and app-only permissions)
- Exchange Online (new APIs for userPhoto, notifications, and more)
- Office 365 Groups APIs (Messages, Files, Calendar)
- Video Portal APIs
- Office Graph APIs
- OneNote with Office 365
- Skype Web SDK
The Do.com site already had options to export meeting agendas to Evernote, so this offered an opportunity to integrate the new OneNote APIs with Office 365. “New” might be a little deceiving as the APIs are identical to the existing OneNote consumer APIs (just different authentication/access token providers). In fact big efforts were announced to provide common APIs across consumer/commercial services with OneDrive/OneDrive for Business, OneNote, and Outlook/Outlook.
OneNote integration with Office 365
Do.com is all about facilitating a more productive meeting and in the Land of Gates, most meetings involve Skype for Business (formerly Lync) as a meeting bridge. The new Skype Web SDK posed a great opportunity to Skype-enable the Do.com add-in with audio and video (the SDK support other modalities).
Skype Web SDK integration for Audio/Video
Finally, the Do.com add-in leveraged the new Exchange Online endpoints to display a user’s high-resolution profile picture. This is a nice touch that almost any application connecting into Office 365 can benefit from.
Do.com leveraging new Exchange Online APIs for Profile Picture
Conclusion
I hope you can see how this was a significant week of announcements for Office 365 developers. Be sure to check out some of the great sessions delivered at //build on Channel 9 and let us know what you think of the new Office 365 extensibility announcements! Below are some helpful links related to the announcements at //build, but you can always find the latest info at https://dev.office.com
Office 365 Unified API Endpoint
https://channel9.msdn.com/Events/Build/2015/3-641
OneNote APIs for Office 365
https://channel9.msdn.com/Events/Build/2015/2-715
Office 365 Groups REST API
https://channel9.msdn.com/Events/Build/2015/3-701
Developing for Outlook.com AND Office 365
https://channel9.msdn.com/Events/Build/2015/3-742
Developing for OneDrive AND OneDrive for Business
https://channel9.msdn.com/Events/Build/2015/3-734
Skype Developer Platform
https://channel9.msdn.com/Events/Build/2015/3-643
Building Solutions with Office Graph
https://channel9.msdn.com/Events/Build/2015/3-676
Next-gen Outlook Add-ins
https://channel9.msdn.com/Events/Build/2015/3-694
Busy week...time to relax in my #DoSocks