26 July 2012

SharePoint Online 2013 Preview: Programmatic Authentication

UPDATE: There is a solution to this issue described below, see this post.

As I'm sure you're all aware, SharePoint 2013 Preview (a.k.a. Wave 15) is now upon us!

I thought it would be a great time to confirm programmatic authentication into SharePoint Online, based on the Passive and Active authentication methods we have come to rely upon in the current 2010 based release of SharePoint Online (a component of Office 365).

The Passive technique requires the user running the code to interactively log in (or to have authenticated within the last 8 hours and still have an unexpired cookie available). This method is outlined here on MSDN and this was the basis of the SharePoint Online capable version of SharePoint Explorer.

Unfortunately this authentication method doesn't appear to work against the new version of SharePoint Online from my initial testing. Once the user is authenticated, the WebBrowser window that is created as part of the process looks like this:

What is interesting is that clicking the "GO BACK TO SITE" link (what's with the sudden Microsoft Metro obsession with ALL-CAPS?) actually brings up the SharePoint Preview site in the temporary WebBrowser object window. This makes me think that the approach can potentially work with a bit of Fiddling (pun intended)...

The Active authentication method described here appears to work just fine, thanks Wictor!

Note that you can create your own Preview tenancy of the upcoming version of SharePoint Online here. You need to go with an Enterprise tenancy as the other options won't grant you SharePoint Online. Have fun with it!

2 comments:

  1. do you have a code example that shows how to use this? the thing from Victor is very sparse on information on how to implement and use this with sharepoint online.

    ReplyDelete
    Replies
    1. The Wictor page I've linked to includes a download link which includes a code sample, it's at the bottom of the article just above the comments.

      Delete