Closed siva111 closed 3 years ago
Can you check in network tools if there are requests to non-localhost (proxy's endpoint) but actual SharePoint URLs? Get all/paged helpers use pagination tokens and URIs from API responses to construct next request. I probably not replacing these URIs. Will take a look. It is definitely something which can be amended.
Just checked. getAll, getPaged, getNext helpers work just fine with proxy.
Hi @koltyakov , Not sure why am still getting this issue. I will try in another tenant and will update you shortly. Thanks for the prompt responses.
Hi @AndrewKoltyakov , I am using SP Rest Proxy as module in an angular 6 CLI SPA with SharePoint Online. Things are working fine when there is 1 or 2 rest calls to SPO site. But getting Access Denied error when trying to get data from more than 2 lists or get all data items from a list ( >5000 items) using getPaged method. Following is the code i used for getting all items from list. First call works fine and in getpagedData method it fails with Access Denied.
getData(options: PnpOptions) { let data = from(sp.web.lists.getByTitle(options.ListName).items .filter(options.Filter).select(options.Select) .orderBy(options.OrderBy) .top(options.Top) .get()); return data; } getpagedData(result: any, resultArray: any[]) { if (result.hasNext) { from(result.getNext()).subscribe((data) => { data.results.map(item => { resultArray.push(item) }); this.getpagedData(data, resultArray) }); } }
In terms of accessing multiple lists data it fails in a random manner sometimes second call or sometimes third call.
Any clue on this.
Thanks in Advance.