Quantcast
Channel: SharePoint 2013 - Development and Programming forum
Viewing all articles
Browse latest Browse all 7589

SharePoint 2013 API jQuery.Ajax Access Denied

$
0
0

I am trying something simple - to retrieve list information from a SharePoint 2013 list. However, I am getting access denied when the jQuery Ajax is processed. I've tried setting up headers with the headers object and the beforeSend function, but with no success. Here is my jQuery.Ajax:

$.ajax({ headers:{// also tried with Authentication"Authorization": someBasicCryptedCred,"Accept":"application/json; odata=verbose"}, url:"http://spSiteCollection/_api/web/lists/getbytitle('MyList')/items", type:"GET", success:SuccessProcess, error:ErrorProcess});

1. My application is a simple MVC Mobile app.

2. My site collection's Basic Authentication is enabled from the CA.

3. $.support.cors are set to true

4. jQuery version used is 1.9.1

5. Browsing to the passed URL in the ajax, loads without problem.

I am following these documentation:

http://msdn.microsoft.com/en-us/library/jj870858.aspx

http://msdn.microsoft.com/en-us/library/jj163228.aspx




Viewing all articles
Browse latest Browse all 7589

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>