We are trying to perform GET http://<site url>/_api/web/webs
using SAML Authentication.
User can access subsites through UI. But still getting 403 while accessing above API using ReST.
Kindly let us know how can we resolve this issue.
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It only takes a minute to sign up.
Sign up to join this communityWe are trying to perform GET http://<site url>/_api/web/webs
using SAML Authentication.
User can access subsites through UI. But still getting 403 while accessing above API using ReST.
Kindly let us know how can we resolve this issue.
The endpoint you need to use is
/_api/web/getsubwebsfilteredforcurrentuser(nwebtemplatefilter=-1,nconfigurationfilter=0)
It will give you permission trimmed list of subsites
The /_api/web/webs
endpoint only works for users with elevated permissions.
Reference - Webs REST API reference