Get current sharing settings for document and load list of users it has been shared automatically.
Namespace: Microsoft.SharePoint.Client
Assembly: OfficeDevPnP.Core.dll
public static ObjectSharingSettings GetObjectSharingSettingsForDocument(this Web web, String urlToDocument, Boolean useSimplifiedPolicies = True)
Type: Microsoft.SharePoint.Client.Web
Web for the context
Type: System.String
Full URL to the file which is shared
Type: System.Boolean
Boolean value indicating whether to use the SharePoint simplified roles (Edit, View).
Type: ObjectSharingSettings
A ObjectSharingSettings object