Office365 - Adding alias for multiple users for custom domain

Hadrien Bailly 20 Reputation points

Hi, my company is using Office365 under the Business Standard plan. We are using a custom domain as default, and we just added a new custom domain.
How can I create an alias for this new domain for all the active users ? Is there a way to do it directly when adding the new domain ? How about future new users : will we have to add manually aliases for each domains added ? Thank you

Microsoft 365
Microsoft 365
Formerly Office 365, is a line of subscription services offered by Microsoft which adds to and includes the Microsoft Office product line.
3,980 questions
Windows 365 Business
0 comments No comments
{count} votes

Accepted answer
  1. Vasil Michev 97,231 Reputation points MVP

    Unfortunately, you cannot automate this as Exchange Online does not support email address policies. Thus your best option is to use PowerShell. The solution will vary depending on whether you want to add the address as primary or secondary alias, but in both cases is fairly easy to do:

    Get-Mailbox -RecipientTypeDetails UserMailbox -ResultSize Unlimited | % {Set-Mailbox -WindowsEmailAddress $_.PrimarySmtpAddress.Replace("","") }


    Get-Mailbox -RecipientTypeDetails UserMailbox -ResultSize Unlimited | % {Set-Mailbox -EmailAddresses @{add=$_.PrimarySmtpAddress.Replace("","")} }

    Make sure to replace the corresponding domain names, and of course, test against a user or two before running it across the company. Even better, expand these examples into a full-blown script with proper error checking and such. Here's one such example from Tony:

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful