SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

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 -

share|improve this answer

There are some of these claims helper classes out there that contains some bugs. Check out this post 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


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.