An incident came up where a Microsoft 365 group was created, erroneously including all members of Entra ID - internal and guest users.
This triggered a process where a welcome email was sent “You’ve joined the … group”. For reasons unknown to me (maybe throttling?), the welcome emails dont go out all at once. They appear to trickle out slowly over the course of the day.
This was brought to our attention with a request to stop these emails. One approach is to turn off the welcome messages via PowerShell with Set-UnifiedGroup and -UnifiedGroupWelcomeMessageEnabled
parameter.
The whole PowerShell command looks like this:
Set-UnifiedGroup -Identity "[email protected]" -UnifiedGroupWelcomeMessageEnabled:$false
.
In our case, the offending M365 group was deleted, yet welcome emails still kept going out. After some quick message tracing, it became apparent only about half of the original member pool received the email, with more yet to receive it.
In a pinch, this can be addressed via Mail flow rules in Exchange Online for any inbound or outbound emails from the address. Drop any incoming our outgoing emails from this group at the mailserver. You can remove the rule later once things settle.