I've been trying to do a simple GET REST call from an external website (Dynamics CRM) to a SharePoint Online site. All I want is to list the files from that SharePoint Online folder into an IFrame on my external website.

I've tried all the examples provided by Microsoft including their cross domain JS solutions but nothing works. It seems they were all built to work within a SharePoint app. I found a couple of similar questions but not a response. One thing people mentioned that these calls are anonymous and the SharePoint Site should support CORS. Well it is a SharePoint Online and I cannot modify it to "Allow Cross Domain Origin".

I should use Javascript for this. I noticed that when I am logged into SP Online, I can paste the call (e.g. https://mydomain.sharepoint.com/sites/mysite/_api/web/) and see the metadata but doing the same call from within the Iframe on the webpage I get Not authorized or required CORS.

Any suggestions on this will be greatly appreciated.

  • 3
    Using SharePoint designer you call REST API in particular site and then workflow Retrieve data from them Dec 29, 2015 at 6:30
  • 3
    SharePoint (or any https by default) does not let the outside world in (CORS) Which is obvious, otherwise SharePoint would be used as a datastore for public websites. Microsoft wants you to go via the AZURE platform for that.. search for ADAL js. The workflow answer is technology on the inside which can publish information to the outside Dec 29, 2015 at 8:50

1 Answer 1


Have a look at the iframe solution described here: https://www.vlieshout.net/how-to-gather-data-from-sharepoint-using-rest-api-on-external-website/

It basically creates a page in SharePoint and set it to allow opening in an iframe. As this page is hosted in SharePoint you can access the REST services. You could for example do everything (data gathering and rendering) on this page and use part of the HTML output or you can use the page as a proxy page to access the REST endpoints (by making it a bit more dynamic then the example).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.