0

Can these settings be accesed via CSOM?

enter image description here

3
  • out of these settings, exactly which setting you want to change using CSOM? Check this & this and let me know if it helps you. Jul 3 '20 at 9:39
  • Just want to read them. Not change them. Jul 6 '20 at 11:25
  • Are access request settings and those settings the same? Jul 6 '20 at 11:44
0

Create a context object using your admin url. Then

using (context)
  {
   var tenant = new Tenant(context);
   SiteProperties siteProp = tenant.GetSitePropertiesByUrl("Site collection Url", true);
   context.Load(siteProp);
   context.ExecuteQuery();
 }

//site prop return various members of type enums which
define the sharing capability and sharing settings of the site

Edit:
For tenant level settings we can access them using
tenant.<<MemberName>>
3
  • I will test. Thanks. Jul 6 '20 at 11:25
  • Those settings are the sharing capabilities from SharePoint Admin? And not on the site? Like allow Guests ... ? Jul 6 '20 at 11:34
  • The site properties are specific to SharePoint site collections. Is it not what you are looking for? Please let me know. Jul 6 '20 at 11:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.