I'm a Sharepoint beginner, I'm trying to access a list which is in another site collection under another web application in the same farm. I'm working with pnp core js library.
new pnp.Web("http://mycollectionsiteurl/").lists.getByTitle('Emloyee').items.get().then((result: any)
But I'm getting this error :
OPTIONS http:///_api/web/lists/getByTitle('Employee')/items 401 (Unauthorized) Fetch API cannot load http://mycollectionsiteurl/_api/web/lists/getByTitle('Employee')/items. Response for preflight has invalid HTTP status code 401
Please tell me how can i resolve this problem ? thanks.