1
votes

I'm using Office 365 developer preview environment. I have a team site in SharePoint online, with a list. I login to the team site using Microsoft Account.

How do I authenticate myself, when trying to access a list items from another WebApplication? I created auto-hosted app, but I cannot figure out credentials. Link to some articles or examples, how to read/write list items would be appreciated.

1

1 Answers

0
votes

I've had a similar issue. I created a SP 2013 auto hosted app that is deployed to the SP 2013 developer Office 365 developer site. I try to fetch list data and get a 403 on the 'GetResponse()'.

HttpWebRequest request = (HttpWebRequest) HttpWebRequest.Create(sharepointUrl + oDataUrl);
request.Accept = "application/atom+xml";
request.Credentials = CredentialCache.DefaultCredentials;
HttpWebResponse response = (HttpWebResponse) request.GetResponse();