Hi there, I want to use the REST api for SharePoint online 2013 to access user data, here is an example:
https://<sharepoint_online>/<site name>/_api/web/list/GetByTitle(<list name>)/items
This call works in the browser when I have a session on SharePoint. I want to use this api call on a remote web page (outside SharePoint), either through AJAX and a proxy, or server side (Java). These are the steps I take:
- call https://login.microsoftonline.com/extSTS.srf with a SAML assertion
- receive a token in response
- call https://<my_sharepoint_online>/_forms/default.aspx?wa=wsignin1.0 with the token in the request body
- receive a 401 (!) response, but with 2 cookies rtFa and FedAuth
- make the REST api call providing the cookies in the http header
Now this is where I get stuck, SharePoint responds with 401, and I don't know what I am doing wrong
Any ideas?
Is there a better way to access the REST api from a remote location without using OAuth?