This article is more than 1 year old

Programming Office 365: Hands On with Microsoft's new APIs

Half-baked samples – is this stuff really ready?

Trying a sample

The first sample I tried was called How to use Discovery Service.

The app ran, but gave errors including “bad request”, and “the key was not present in the dictionary".

I discovered that the documentation for the sample is missing a critical step. In the Azure AD portal, you have to configure permissions for the application. I did that and the sample ran perfectly.

What if you want to write a file to SharePoint? I turned to another sample, called Office 365 APIs Starter Project. I have had partial success with this sample. At first I could not get it working. The Nuget package manager for Visual Studio could not restore the packages, the documented fix did not work, and then after twiddling with the clientID and redirect URI I was able to run the app and sign in, but got a permission error trying to access resources.

The Office 365 Starter app

However, I tried on another machine and it installed and ran perfectly — but only if I log in with an Office 365 global administrator. If I log in as an ordinary user I get our old friend “bad request”.

I have yet to try the iOS and Android libraries, and of course it is possible that the experience here is better, or that I was just unlucky. Most of the issues seem to be permission-related, and it would help to have a clearer description of all the permission ducks that have to be in line for this to work.

Registering mobile apps with Azure AD is still in preview

Registering mobile apps with Azure AD is still in preview

Despite Microsoft’s TechEd announcement of general availability of Android and iOS SDKs, some of this stuff appears still to be in preview. Native client applications (for Windows or mobile devices) are still marked as preview in the Azure management portal. I do not envy anyone trying to write an iOS or Android Office 365 client equipped only with Microsoft’s sparse "Getting Started" documentation.

Google does a better job of documenting its API for Google Apps, and its sample .NET code for writing a document to Google Drive is refreshingly simple compared with Microsoft’s effort.

It is inevitable that if Microsoft sustains the momentum behind Office 365, there will be increasing demand for mobile apps that integrate with the service. Providing mobile SDKs is a critical step, but the initiative needs better documentation and samples, together with a more coherently organised developer site. ®

More about

TIP US OFF

Send us news


Other stories you might like