Last call to make your voice heard! Our 2022 Developer Survey closes in less than a week. Take survey.

Questions tagged [cors]

CORS (Cross-Origin Resource Sharing) allows browsers' XMLHttpRequest object to make cross-origin requests.

Filter by
Sorted by
Tagged with
0 votes
0 answers
27 views

How to get the user photo from SPA? (CORS error)

I'm trying to get the user photo form a SPA developed with Angular using MSAL.js 2.0 and PNP JS. I tried the following endpoints: https://tenant.sharepoint.com/_vti_bin/DelveApi.ashx/people/...
user avatar
0 votes
1 answer
143 views

SPFx RSS Webpart CORS Policy Blocked

First of all, Happy Christmas and Happy new year. I have an issue trying to display a RSS feed into a SPFx webpart. I'm using this code on github: https://github.com/pnp/sp-dev-fx-webparts/tree/master/...
user avatar
0 votes
1 answer
269 views

Cors Error when generating access token for SharePoint point online from a JavaScript application

Any help is much appreciated. I'm trying to save data from a html form to a list in SharePoint online. I'm using SharePoint REST API to add items to the list. Ajax call to generate access token is ...
user avatar
0 votes
0 answers
62 views

CORS and SP2019 on prem dev

I'm again trying my hands on some SPFx development on code downloaded from GitHub. As we are behind firewalls and they won't open anything I have to use a local CDN for all my manifest files and what ...
user avatar
  • 13
0 votes
1 answer
475 views

Error Access to XMLHttpRequest at "http" from origin has been blocked by CORS policy - Graph API -

I would like to retrieve list of recent files from a particular document library or site for the logged on user This is using a content editor on a sharepoint classic site When i run the code below i ...
user avatar
  • 4,090
0 votes
0 answers
267 views

Make SetIsOriginAllowed Safe for SharePoint WebAPI?

I'm working on a test WebAPI for SharePoint that is secured with Azure AD via bearer tokens. At first, I manually specified every allowed origin with a statement like this inside ConfigureServices ...
user avatar
1 vote
0 answers
38 views

Cross domain call using Graph API

I saw an article that we cannot do cross domain calls with SharePoint Rest API Updating SharePoint item using REST API from outside of SharePoint. In my case, my app is hosted in azure web app. The ...
user avatar
0 votes
1 answer
335 views

AJAX Request to sharepoint REST API But receiving CORS error

I want to request a sharepoint server with ajax but I get an CORS error : How can I solve this issue please $.ajax({ url: "http://myserver.com" + "/_api/web/Lists/GetByTitle('...
user avatar
0 votes
1 answer
288 views

How to enable Cors with URL Rewrite Sharepoint 2016?

I am getting CORS policy error. I am trying to use URL Rewrite plug in. I have IIS 10. I tried the examples(links) below, but it still didn't work. So What can i do more? https://techcommunity....
user avatar
  • 641
0 votes
0 answers
88 views

I get CORS error in SharePoint. I also changed web-config but nothing happens

I call AJAX request and the browser got CORS error. I tried to add "Access-Control-Allow-Origin" in IIS web.config. But it doesn't work. I have two servers. My AJAX is true only when I have ...
user avatar
  • 641
0 votes
1 answer
1k views

Problem with CORS Policy when call to API with SPFx

have problem with CORS Policy. Get an error: Access to fetch at 'https://XXX.azurewebsites.net/api/protocols' from origin 'https://localhost:4321' has been blocked by CORS policy: No 'Access-Control-...
user avatar
  • 15
1 vote
2 answers
581 views

Problem making 3rd party API POST calls using SPFx

I need to fetch few details from the 3rd party API so I am making a POST request (required by the API) to that API using HttpClient But every time I am getting the below error. Access to fetch at '...
user avatar
  • 808
1 vote
1 answer
654 views

Icon missing and access to XMLHttpRequest at officeapps url got CORS error

I am developing a SPFX extension. While I am debug it at my SP online site using debug script, I found the icons are not showing up. Those icon are <i className="ms-Icon ms-Icon--PageEdit &...
user avatar
  • 4,016
0 votes
1 answer
956 views

How can I make a GET request with Headers to an external API?

From a SP Online SPFx Web Part (No Javascript Framework), I've been trying to do a GET request to an API that expects some headers and nothing works. If use Postman, with the same URL and Headers it ...
user avatar
0 votes
1 answer
72 views

CORS and pre-flight OPTIONS - Disable authentication for single page

I'm struggling with a CORS request to our SharePoint 2010 server. It seems that the CORS request to the SharePoint server requires authentication, which the pre-flight of the CORS-request does not ...
user avatar
  • 179
3 votes
2 answers
273 views

Search page not showing after URL rewrite on reverse proxy

Our SharePoint 2016 on-premise farm have setup Internet access. Our reverse proxy have setup URL rewrite from 'https://www.mysharepoint.com' (Internet URL) to https://server_wfe1/ (our web front end ...
user avatar
  • 4,016
0 votes
2 answers
64 views

Front-end connection between two site-collections

I have two site collections on the same farm (on-prem SP 2016), but different domains (business.* and projects.*). I have full control on both sites. And yet, I cannot access one from the other. I ...
user avatar
1 vote
0 answers
22 views

cross domain issue in sharepoint 2013 while accessing sharepoint list items using Ajax

i have written Rest Ajax call to fetch sharepoint 2013 list items from another sitecollection which works fine in IE but when same in chrome throws error CORS, cross domain issue. Am looking for ...
user avatar
  • 11
3 votes
0 answers
1k views

Calling ASP.NET Web API 2 from an SPFx webpart

I am facing an issue with authenticating my SPFx webpart against an Azure AD backed Web API. What I have done so far is Created a ASP.NET WEB API 2 project. Added OWIN and configured CORS and OIDC in ...
user avatar
  • 517
6 votes
1 answer
11k views

SPFx calls blocked by CORS policy

I'v been trying to access various apis through SPFx and I am constantly seeing this issue. I do not know how to fix this can anyone assist or explain what I am doing wrong or missing? This works ...
user avatar
  • 1,438
1 vote
0 answers
20 views

Workflow 2013 http request with credentials

I have a C# WebApi2 endpoint with CORS and SupportsCredentials activated. What I'm trying to do is to call this endpoint from a Workflow. How do I pass the credentials?
user avatar
  • 1,176
2 votes
2 answers
11k views

How to add multiple URL to Access-Control-Allow-Origin header in SharePoint 2013 web.config

To resolve the CORS issue I have added the following headers in the web.config file of SharePoint 2013 <add name="Access-Control-Allow-Origin" value="http://localhost:4200" /> <add name="...
user avatar
1 vote
1 answer
4k views

Error : "The 'Access-Control-Allow-Origin' header contains multiple values" while enabling CORS in SharePoint 2013

I am trying to access SharePoint Document Library Data from outside application through rest api. Below is the code I am using. function readSPRestApi() { console.log("Calling Api.."); ...
user avatar
1 vote
0 answers
168 views

Trying to do a POST from SP to Service Now

I have been trying to do a post in Service Now through an angularjs form in SP, however I am always getting a CORS error. I've taken all CORS rules from Service Now and still am getting this error and ...
user avatar
  • 121
2 votes
0 answers
848 views

is on-premise Sharepoint 2016 REST API possible with oauth?

I have a Sharepoint 2016 server and a python web server. I would like to read data from Sharepoint with my python server. I was able to do this on Office 365 on the cloud but did not find much ...
user avatar
0 votes
1 answer
84 views

show images from host-web in add-in (app web) CORS problem

I need to display images from the host web in an add-in, without the user necessarily having visited the host web. Is this achievable? The images are stored as item attachments in a list, and I've ...
user avatar
  • 23
2 votes
1 answer
2k views

AJAX POST REST call generates CORS error

My SharePoint client JavaScript is calling an external REST API URL, using the code pattern below $.ajax({ type: "POST", url: 'https:\\theexternal.domain......, contentType: "application/json", ...
user avatar
7 votes
1 answer
683 views

CORS problems upload.aspx dialog

I'm trying to upload a file and to show the Upload.aspx dialog from an external web site. I have this code: function openUploadNewDocumentDialog(passingID) { var dialogOptions = SP.UI.$...
user avatar
0 votes
3 answers
4k views

"Cross-Origin Request Blocked" - how to bypass for REST queries

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource" I'm trying to use REST api to query a library to find all the file names in it so that I can populate a ...
user avatar
  • 739