Preventing external senders from emailing internal Microsoft 365 groups
This recipe provides the necessary steps for preventing external senders from emailing internal Microsoft 365 groups, enhancing control over email communication, and improving security.
Getting ready
Ensure you are an Exchange Administrator or Global Administrator. This task requires the use of the Exchange Online PowerShell module, which should be installed (Install-Module -
Name ExchangeOnlineManagement
).
How to do it…
- Use the
Connect-ExchangeOnline
cmdlet to establish a session (be sure to update it with your own UPN):Connect-ExchangeOnline -UserPrincipalName admin@example.com -ShowProgress $true
- Use the
Set-UnifiedGroup
cmdlet to restrict external senders. ReplaceGroupName
with the name of your Microsoft 365 group:Set-UnifiedGroup -Identity "GroupName" -RequireSenderAuthenticationEnabled $true
How it works…
The Set-UnifiedGroup
cmdlet configures the properties...