Exchange Online - Enable group moderation and sending restrictions

Search for a command to run...

No comments yet. Be the first to comment.
Recently, I've been updating a bunch of Visual Studio Azure Functions and Blazor projects to .NET 8.0 from 7.0. Most went smoothly but when I came to run the Azure Functions project locally in Visual Studio, I ran into this error: Error: There is no...

Want to track how long you spend in Microsoft Teams meetings or have a request from a user for some stats? Luckily, it's actually quite easy to get the meeting durations for any user in your tenancy. Common scenarios for needing meeting duration Ok,...

One of the most requested features on Microsoft's UserVoice forum was the Support for Dynamic '+' Email Aliases in Office 365. This has been pending since 2017 and Microsoft finally implemented it in September 2020. Woohoo! However, it's not enabled ...

My computer is in the lounge and it tends to be left on for most of the day (especially with WFH in full effect). With 4 monitors hooked up, it actually outputs a decent amount of light and if you're trying to watch a movie on the TV it can be distra...

Do you run a WordPress site? Have you configured it so that its contents are automatically backed up in case of failure/hack/human error? If it's a no, then you better get cracking as it can happen to anyone. Check out how you can automatically backu...

Whether it be a large group or one that has restricted users, you may need to limit who can send to these mail enabled security groups. In addition, you may even want to enable moderation to allow specific users to approve/deny messages from reaching the members.
The good news is that all this can be done by using AD and Exchange to enable group moderation.
These steps are geared towards environments which have their Active Directory schema extended with Exchange attributes and that sync to AAD with Azure AD Connect. In this scenario, Exchange is not in hybrid mode.
| Name | AD Attribute | Description | Values |
| Allow send from (user) | authOrig | List of senders (users) that are allowed to send to the group | List of user distinguished names (dn) |
| Block send from (user) | unAuthOrig | List of senders (users) that are blocked from sending to the group | List of user distinguished names (dn) |
| Allow send from (group) | dlMemSubmitPerms | List of senders (groups) that are allowed to send to the group. This is used in place of authOrig if you need to specify groups* | List of group distinguished names (dn) |
| Block send from (group) | dlMemRejectPerms | List of senders (groups) that are blocked from sending to the group. This is used in place of unAuthOrig if you need to specify groups* | List of group distinguished names (dn) |
| Require senders to be authenticated | msExchRequireAuthToSendTo | Used to limit senders to only Authenticated users (inside organization) | Require sending from authenticated source = True, Allow sending from any source = False |
| Enable group moderation | msExchEnableModeration | Is moderation configured for this group? | Moderation enabled = True, Moderation disabled = False |
| List of moderators | msExchModeratedByLink | List of users who will receive and manage the approve/deny emails. The maximum number of moderators is 10 (more information). If you specify more than 10 then Exchange will throw an exception and moderation will not work as intended. | List of user distinguished names |
| Skip email approval | msExchBypassModerationLink | List of users who can send emails without requiring approval/moderation | List of user distinguished names |
| Sender notification | msExchModerationFlags | What notification (if any) will the sender receive when their email is not approved | Notify all senders when their messages aren’t approved. = 6 . Notify senders in your organization when their messages aren’t approved. = 2. Don’t notify anyone when a message isn’t approved. = 0 |
| Hide from address book lists | msExchHideFromAddressLists | Is this group hidden from address books in Exchange? | Hidden from address books = True, Visible in address books = False |
| Managed by | managedBy | Users who can manage the membership of the group | List of users |
| Members | member | List of users who are members of the group, they will receive any approved emails sent to the group | List of users |
authOrig/unauthOrig are used to store a list of DNs of specific users who have/do not have permission to send to the object.
dlMemSubmitPerms/dlMemRejectPerms are used to store a list of DNs of groups whose members are considered to have/not have permission to send to the object.
dlMemSubmitPerms/dlMemRejectPerms cannot be used to store DNs of specific users you want to allow/deny access to. The values in these attributes are always interpreted as groups. User objects aren't groups, and listing a user DN in one of these attributes would have the same effect as listing an empty group instead.
authOrig and dlMemSubmitPerms are used to grant access to specified users/groups. If either of these attributes is present, anyone not listed under authOrig or who is not a member of a group listed under dlMemSubmitPerms will be denied access.
unauthOrig and dlMemRejectPerms are used to deny access to specified users/groups. If either of these attributes is present, anyone not listed under unauthOrig or who is not a member of a group listed under dlMemRejectPerms with automatically be granted access.
Taken from https://groups.google.com/forum/#!topic/microsoft.public.exchange.development/clYIH052JXw
Enable moderation of group, require authenticated senders and specify a moderator
Set-ADObject -Identity [GROUP_IDENTIFIER] -Replace @{msExchEnableModeration = $true; msExchRequireAuthToSendTo = $true; msExchModeratedByLink = @("[DN_OF_A_USER]")}
Allow only users in a specific group to send to the group
Set-ADObject -Identity [GROUP_IDENTIFIER] -Replace @{dlMemSubmitPerms= @("[DN_OF_ALLOWED_GROUP]")}
Allow specific users to bypass moderation and send directly to members of the group
Set-ADObject -Identity [GROUP_IDENTIFIER] -Replace @{msExchBypassModerationLink = @("[DN_OF_ALLOWED_USER]")}