Hi, I need to restrict sharing of documents with internal users of my organization in SharePoint online. For ex. currently, I can share my documents on my site to users who are not members of my site. I would like to use the REST APIs to get the user's membership and then do not allow access to non-members of my site for my site items or documents.
Could you please suggest if there is any REST API in SharePoint online which can support this?
Thanks
Vibhuti