How to disable sending emails to users after providing access. Each time you add a user to a security group or to a SharePoint site, the user, by default, is getting a message that they were added to the group/site.  This can be unwanted behavior , especially when you add /change security groups and you want to avoid a mass email distribution of this message. Even though you do have the option the uncheck the box  “send an email invitation”, I found myself more than once forgetting to uncheck the box, and dealing with the flood of emails.

So how can we disable this default behavior?

One option is to edit the page template that is being used to add user to a security group, and  manually change the default check box for sending emails to false:

1.       Navigate to C:\Program Files\Common Files\Microsoft Shared\web server extensions\15\TEMPLATE\LAYOUTS folder.
2.       Find and the aclinv.aspx file.
3.        Backup the aclinv.aspx file (just copy it)
4.       Edit the aclinv.aspx file with Notepad

<asp:CheckBox
runat="server"
id="chkSendEmailv15"
Checked="true"
class = "ms-aclinv-checkbox"
OnClick="UpdateSendEmailMessage()"/>

6.       Change the value from “True” to “False” and save the file.

<asp:CheckBox
runat="server"
id="chkSendEmailv15"
Checked="false"
class = "ms-aclinv-checkbox"
OnClick="UpdateSendEmailMessage()"/>

7.       You should see the changes after refreshing the pages.

Cons:

  • You will need to make the change on each frontend.
  • Not scalable! when adding a new frontend you will need to remember to make the same change
  • Some updates/patches may override your change.
  • May impact other sharing behavior, for example document sharing.
  • This is not a supported solution by Microsoft

Another way is to try and tackle this through the client side, with JavaScript or Jquery targeting the checkbox field from a master page. I haven’t tested this yet, but I wonder if this can be done… one problem may be if the page opens in Iframe which will limit your option to access the page elements.