Sign up for Office 365
Learn more about Office 365
I am getting exception "The HTTP request was forbidden with client authentication scheme 'Anonymous'." while trying to access people.asmx web service.
My code is
ClientContext clientContext = ClaimClientContext.GetAuthenticatedContext(TargetSite);
SPPeopleService.PeopleSoapClient ps = new SPPeopleService.PeopleSoapClient();
ps.Endpoint.Address = new System.ServiceModel.EndpointAddress(TargetSite+"_vti_bin/People.asmx");
//searchTxt is a textbox in which i am taking the value of the user
SPPeopleService.PrincipalInfo userlist=ps.SearchPrincipals(SearchTxt.Text, 50,SPPeopleService.SPPrincipalType.User);
string userid = userlist.UserInfoID.ToString();
Thanks in advance
This is Jonis from Microsoft SharePoint Online Support.
When working with SharePoint Online for Office 365, you can create custom developed solutions. While Microsoft allows custom developed solutions, we ask that you support any custom solutions you develop. It is possible that your people.asmx web service request is not allowed in the multi-tenant environment of SharePoint Online. To resolve this error, I recommend the following links to the SharePoint Online Developers Guide and the SharePoint Online Developer Resource Center:
SharePoint Online for Office 365 Developer Guide
SharePoint Online Developer Resource Center
Download: SharePoint Online for Office 365 Developer Guide
If that does not answer your question please let me know as I will continue to monitor this thread for a few days and will reply to any additional posts or questions.
Microsoft Office 365 SharePoint Support
Thanks for replying.
How can we know that our office 365 environment supports people.asmx web service request or not?