0

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.

0

As you are requesting list from the another web application or site collection that's why it is giving unauthorized error code 401 in response.

Make sure you have rights there in that web application or site collection too.

  • and how or where can I make sure if I have these rights ? – Wissem Cherouana May 12 '17 at 18:05
  • @wissem As you have told that you are trying to access the list which is not in a current web application or site collection.so make sure that you have rights in "mycollectionsiteurl" from your URL where your list resides. – SynozeN Technologies May 12 '17 at 18:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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