new way to get access to office APIs

12 months ago, we learned how to access the managed API of Exchange Online – in order that our WPF application might show a screen with the associated office 365 user’s emails.

Now, we can dump all those “ancient” ideas (and at least 90% of the reason why we even needed to implement our own oauth2 endpoints, in an office 365 integrated world).

Folks have released an oauth2-powered version of the office 365 APIs. What is more, they have release tooling for visual studio that builds out the SP record in an AAD tenant suited to accessing those APIs, with their various permissions.

Screenshot (18)

We make a web app, using MVC wizard in visual studio 2013 (update 1, augmented with extension for office 365 APIs). We use the most basic starter project, since the extension is going to rewrite it all anyways. We see the developer-time tooling, above, requiring that we logon to the AAD instances that will manage this application.

Screenshot (19)

The tooling has us use the discovered APIs to pick ports…

Screenshot (20)

Screenshot (21)

and permission to access particular operations on those ports

Once we push the code to an azure website, we see the samples viewer of the APIs:

Screenshot (22)

In the Auzre console, for our AAD, we see what got registered behind the scenes:

Screenshot (23)

To this we add our azure website published API redirect URI

Screenshot (24)

Screenshot (25)

Screenshot (26)

over https even (not shown).

This allows us to see our office365 mailbox:

Screenshot (27)

Bit easier than using the OLDER “managed API” of Exchange:

About home_pw

Computer Programmer who often does network administration with focus on security servers. Sometimes plays at slot machine programming.
This entry was posted in Azure AD. Bookmark the permalink.