function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Michael SpritzerMichael Spritzer 


Hello, I'm looking to use the Salesforce REST api to get data from the system into a sharepoint site. We've setup the whitelisted domains in the CORS section but are still getting the "XMLHttpRequest for [URL] required Cross Origin Resource Sharing (CORS)" error.

Our sharepoint site is on our internal network and I was wondering if that's why the whitelisted domain isn't working. Is there a way to get around this?

Here's the javascript call I'm using, just in case I missed something and it's actually a programming error.
        $(document).ready(function() {
                       url: "
               }).done(function(data) {
                }).fail(function (jqXHR, textStatus) {
                         alert('error: ' + jqXHR);

SandhyaSandhya (Salesforce Developers) 
Hi Michael Spritzer,

When I was researching about this error, i found that this error occurs with internet explorer.Please refer below links.
Hope this helps you!

If this helps you mark it as solved.

Thanks and Regards

Michael SpritzerMichael Spritzer
I tried again in Google Chrome and am getting a similar error:
XMLHttpRequest cannot load No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin '' is therefore not allowed access.

Also, I tried using the code locally outside of sharepoint and it works fine, it just fails on the company sharepoint site.
Hi Michael,

Did you ever get this to work? We have a similar situation since our SharePoint instance not exposed to the Internet.