I can't find any API with a method or property to disable this feature when a new site is created. These two checkboxes under "Access Request Settings" are enabled by default. I can apparently set the Request Access e-mail address in code but nothing else. Help



Found it. In its simplest form

Using site As New SPSite(siteUrl)
    Using web As SPWeb = site.OpenWeb(webUrl)
        web.RequestAccessEmail = "TheBigKahuna@contoso.com"
                web.MembersCanShare = False
        End Using
End Using
  • MemberCanShare doesn't appear to be a property of Web in the copy of Microsoft.SharePoint.Client.dll that I've got. Which does appear to be dated 2014 to is pretty out of date. Anyone know where I can get the latest version? Oct 30 '18 at 21:21
  • Ahh... had to grab the latest version of the SharePoint Client SDK Oct 30 '18 at 22:04

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.