question

SHUOH-8693 avatar image
0 Votes"
SHUOH-8693 asked ·

SharePoint 2019 on premise REST API

Hi there,

I have two site collection: one is Personal Site Host another is Team Site. I customize a OneDrive for every personal site for control each site status. there are some code I added in OneDrive.aspx. you could refer to the attachment. If we access the personal site, everything works nicely. On the contrary, If we access the Team Site, the OneDrive.aspx also will be involved and the custom JS will be performed, then I got the following error:

70899-untitled.png


Here is the OneDrive.aspx I amended.

70959-onedrive.txt


The error code is (Red line):

70880-2021-02-23-13-46-37.png

Does anyone have any idea on it? thanks


office-sharepoint-server-developmentoffice-sharepoint-server-customization
untitled.png (97.2 KiB)
onedrive.txt (9.7 KiB)
· 2
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @SHUOH-8693,

It seems that the team site will involve the personal site and invoke the js script. Generally, these 2 sites will be indifferent host/domain which may cause cors/authorization issue. Can you trace the network requests to see which endpoint prompts the error?

Thanks
Baker Kong

0 Votes 0 ·
SHUOH-8693 avatar image SHUOH-8693 BakerKong-MSFT ·

Hi Baker Kong,

These two site are in the same domain but use different FQDN ... :) When I access the Team site, Personal site host prompts the error.

Thanks

0 Votes 0 ·
trevorseward avatar image
0 Votes"
trevorseward answered ·

Customizing OneDrive sites is not supported.

· Share
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

sadomovalex avatar image
0 Votes"
sadomovalex answered ·

looks like at least ports of your Teams site and My Site host are different. In order to avoid CORS problem protocol, host and port should be the same: CORS error on same domain.


· Share
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.