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 am struggling to consume a web service of Office 365 like _vti_bin/lists.asmx.

I found good documentation and an example of how to work with SharePoint and Forms Based Authentication in the SharePoint and Windows Phone 7 Training Kit, but it seems that Office 365 is using Claims Based Authentication / Windows LiveID.

Does anyone have a working example / concept for Windows Phone?

share|improve this question
    
Have you tried to access the service through REST/OData protocol? –  surlac Sep 21 '12 at 14:24
    
Nice, question! We need more OData questions on this site! –  Robert Kaucher May 25 '13 at 19:00

1 Answer 1

Try setting the credentials on the web service like this:

// -- Windows LiveID Client SDK --
using Microsoft.WindowsLive.Id.Client;

...

private void FunctionWorkingWithListsService()
{
    IdentityManager identityManager;
    WindowsLiveAuthenticationModule authModule;

    Lists listsWebService = new Lists();
    listsWebService.Url = listServiceUrl;

    listsWebService.UserAgent = listsWebService.UserAgent + ";" + 
      WindowsLiveAuthenticationModule.WindowsLiveClientHeader;
    listsWebService.Credentials = new NetworkCredential();

    // -- DO WORK --
}

This is not an answer specific to Windows Phone, but answers the more general question of how to authenticate to a web service using Windows LiveID.

Just make sure the user account has the correct level of permissions on the list to perform whatever actions you are trying to perform.

Microsoft has a full code sample of connecting to an Office Live web service using Windows LiveID here. That's where I pulled the basis of this code from.

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.