We are getting 401 from https://docs.atlassian.com/ConfluenceServer/rest/7.17.1/#content-search
Scenario:
When using OAuth mode of Authentication, 22 batched are fetched using next link traversal but accessing next link of 22nd batch gives 401
On the other hand,
When using basic mode of Authentication, 22 batched are fetched using next link traversal but no access link on 22nd batch. Traversal s complete.
As per documentation, only items to which user has access to are returned back in the response.