Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I have been strugling with a problem for a while. I have created some code that utilizes the MsOnlineClaimsHelper to authenticate a sharepoint online user in order to consume the lists.asmx webservice on a sharepoint online instance.

The code runs fine in my development-environment, but once I deploy it on the server it won’t run. I have included the errormessage at the bottom of the post. The only explanation I can find is that it is related to the environment/browserversjon. Can this be the reason? My development machine runs Windows 7 with IE8, and the server runs Windows server 2008 with IE7.

And furthermore, is there any alternative method to extract data from a list in sharepoint online?

[NullReferenceException: Object reference not set to an instance of an object.] SharepointUtils.MsOnlineClaimsHelper.getCookieContainer() +191 SharepointUtils.MsOnlineClaimsHelper.clientContext_ExecutingWebRequest(Object sender, WebRequestEventArgs e) +60
Microsoft.SharePoint.Client.ClientRuntimeContext.OnExecutingWebRequest(WebRequestEventArgs args) +19
Microsoft.SharePoint.Client.ClientContext.EnsureFormDigest() +236
Microsoft.SharePoint.Client.ClientContext.ExecuteQuery() +13
SharepointUtils.SharepointLoginHelper.GetExternalUserID(Guid g) +561
Ekademia.Web.AD.SharepointLoginRequestHandler.ProcessRequest(HttpContext context) +311
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +181 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75

share|improve this question

3 Answers 3

Please visit this similar post where lists in SharePoint Online is accessed through web services and had similar issues. The solution is to use Client Object Model method.

These are some articles that can help you out -

http://blogs.msdn.com/b/cjohnson/archive/2011/05/03/authentication-with-sharepoint-online-and-the-client-side-object-model.aspx

http://msdn.microsoft.com/en-us/library/hh147177.aspx#SPO_RA_CSOM

share|improve this answer

There are some of these claims helper classes out there that contains some bugs. Check out this post http://www.wictorwilen.se/Post/How-to-do-active-authentication-to-Office-365-and-SharePoint-Online.aspx and download the ClaimsHelper class form there and test with it.

share|improve this answer

I ran into this yesterday. I've found that using the MsOnlineClaimsHelper will fail on a server where Windows Identity Foundation is not installed. That may be the case for you too.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.