Aug 07 2017 10:50 AM
In the admin center - site collections - sharing, there is a dialog with the option :
Allowing Non-Owners to Invite New Users.
I'd like to turn this to 'Not Allowed' using CSOM C#.
Does any one know where this settings lives ?
Thanks,
Dave
Aug 07 2017 11:24 AM - edited Aug 07 2017 11:51 AM
Setting actually turns off all Access Request Settings on site permissions (.../_layouts/15/user.aspx)
I have done something similar like this (it's missing Allow Access Request setting):
Group associatedMemberGroup = ctx.Web.AssociatedMemberGroup; Web web = ctx.Web; ctx.Load(associatedMemberGroup); ctx.Load(web); ctx.ExecuteQuery(); associatedMemberGroup.AllowMembersEditMembership = false; associatedMemberGroup.Update(); web.MembersCanShare = false;
web.RequestAccessEmail = ""; web.Update(); ctx.ExecuteQuery();
Aug 07 2017 11:31 AM
I've tried that code already, but it doesn't change the values shown in the Sharing dialog.
Not sure if ithas the desired effect, I was hoping to verify by seeing the settings int eh form change.
Dave
Aug 07 2017 11:39 AM
My example turns off "Allow members to share..." and "Allow members to invite..." check boxes on Access Request Settings. If you turn off "Allow access requests" checkbox, admin center Sharing dialog displays "Status: Not allowed.", at least in my dev tenant.
Aug 07 2017 11:52 AM
Any Idea where the 'Allow Access Requests' flag is in CSOM ?
I'm seeing the same thing where my code unchecks the top two boxes, and unchecking the third gives the result I want.
Thanks,
Dave
Aug 07 2017 11:53 AM
SolutionAdded disabling "Allow access requests" setting to my original code example. It's just emptying RequestAccessEmail property.
Aug 07 2017 11:53 AM
SolutionAdded disabling "Allow access requests" setting to my original code example. It's just emptying RequestAccessEmail property.