1

In sharepoint online I have created 20 sites for a client, they created an account for me and I used that account to create sites.

Now sometime I get emails for request access, where should I update the email address to their Internal IT consultant so he get emails and approve or reject access?

3

Go to Site Settings -> Site Permissions -> Access request Settings (Ribbon) -> "Send all requests for access to the following e-mail address: "
enter image description here

More info - Set up and manage access requests

  • do I need to update all sites with the new email address? – Ali Dec 19 '16 at 6:36
  • Usually access request settings configured under root site level, so you don't need to update all subsites individually. Only in case if your sub-site has unique permissions, you need to go to the sub site's settings and change access request. – Sergei Sergeev Dec 19 '16 at 7:57
1

Make sure you are using the latest csom dll or a version 16.1.4727.1200 or above.

You can use the below code in a loop to change the settings:

// web is Microsoft.SharePoint.Client.Web object

web.Context.Load(web, w => w.MembersCanShare);   
web.Context.ExecuteQuery(); 
web.MembersCanShare = true; 
web.Update(); 
web.Context.Load(web, w => w.MembersCanShare); 
web.Context.ExecuteQuery();

web.Context.Load(web, w => w.AssociatedMemberGroup.AllowMembersEditMembership); 
web.Context.ExecuteQuery(); 
web.AssociatedMemberGroup.AllowMembersEditMembership = true`; 
web.AssociatedMemberGroup.Update(); 
web.Context.Load(web, w => w.AssociatedMemberGroup.AllowMembersEditMembership); 
web.Context.ExecuteQuery();

clientContext.Load(clientContext.Web, w => w.RequestAccessEmail); 
clientContext.ExecuteQuery(); 
clientContext.Web.RequestAccessEmail = clientContext.Site.Owner.Email; //change the email address here
//clientContext.Web.RequestAccessEmail = "user@tenant.com"
clientContext.Web.Update(); 
clientContext.Load(clientContext.Web, w => w.RequestAccessEmail); 
clientContext.ExecuteQuery();

CSOM change access request settings

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.