Tutorial: Adding an email alias in Office 365, Exchange or Active-Directory

There are several ways to add e-mail aliases in Office 365. In this blog I will walk through the possibilities of how to add an alias.
First, the most practical method is via Cloud only. This means that the identities, groups or mailboxes are not known in the on-premises exchange or on-premises Active Directory (AD).
I then explain how to set an alias in Exchange hybrid, where the identities are known in Active Directory. On-premises and synchronised to Azure AD via Azure AD Connect.
This procedure works for: Mailboxes, groups, resources, shared mailboxes, equipments and rooms.
In Office 365 - Cloud only
Cloud Only means that you have no identities, distribution groups or shared mailboxes synchronised from the local Active Directory server.
Add an alias via Exchange Control Panel
Browseto the Exchange Control Panel: http://outlook.office.com/ecp
Select mailboxes

Choose a user, group, shared mailbox where you want to add an alias.
Thenselect e-mail address.

Select +

Select email address type: SMTP
Enter an email address
Select OK

Your alias has been successfully added.
Adding an alias via Microsoft's Admin Center
Navigate to: https://admin.microsoft.com/
Search for the desired user

Open the user settings by pressing the name.

Add the alias in the field below

Select Add.
This operation can also be used for a shared mailbox.
Add an alias in Exchange Online via PowerShell
Login to Exchange Online via these commands and add an alias via this command.
Connect-ExchangeOnline
Set-Mailbox "info" -EmailAddresses @{add="info2@365tips.be"}
On-premises, this can be done with the remote mailbox command:
Set-RemoteMailbox "info" -EmailAddresses @{add="info2@365tips.be"}
On-premises management of mail properties
This procedure is approximately valid for Exchange 2007, 2010, 2013, 2016 and 2019.
If you sync users, groups from the local Active Directory servers then it is also necessary to do the recipient management there.
In a hybrid scenario, you have the Recipient management on-premises. And the rights of mailboxes online.
You can check in Azure AD if users are synchronised via: https://portal.azure.com/#blade/Microsoft_AAD_IAM/UsersManagementMenuBlade/MsGraphUsers

Or via Azure Active Directory - Azure AD connect Blade - https://portal.azure.com/#blade/Microsoft_AAD_IAM/ActiveDirectoryMenuBlade/AzureADConnect

You may get these error messages:
- An Azure Active Directory call was made to keep object in sync between Azure Active Directory and Exchange Online . However, it failed. Detailed error message: Unable to update the specified properties for on-premises mastered Directory Sync objects or objects currently undergoing migration. RequestId : 2b848154-0873-.... The issue may be transient and please retry a couple of minutes later. If issue persists, please see exception members for more information.
- The operation on mailbox "First Last" failed because it's out of the current user's write scope. The action 'Set-Mailbox', 'EmailAddresses', can't be performed on the object 'First Last' because the object is being synchronised from your on-premises organisation. This action should be performed on the object in your on-premises organization.
You can then adjust these settings on the on-premises AD because recipient management is an on-premises competence.
Open the local Active Directory Users & Computers.
Select 'view' -> Advanced Featuresat the top

Open the desired user -> Select properties.

Add an alias attribute via Active Directory.
Select on User Properties -> Attribute Editor
Add a smtp:test2@365tips.be at proxyAddresses . (prefix + suffix / domain)

Force a Azure AD Synchronisation via this blog - to ensure that the changes of the e-mail address to Office 365 will be synchronised.
The alias has been added. You can validate this via: https://outlook.office.com/ECP
Search for the user - Select e-mail addresses.
Validate that the aliases are set.

Add an alias in Exchange on-premises and synchronise it to Office 365
BrowseOn the on-premises exchange server to: the ECP URL and log in with a Exchange Administrator or with a Domain Administrator Account.
Navigate to: https://localhost/ecp/
Select Mailboxes -> Choose the desired mailbox.
Changed e-mail addresses.
Do a Azure AD Sync:
Start-ADSyncSyncCycle -PolicyType Delta

The aliases are now synced to Azure AD / Office 365.
Add an alias in Exchange Online via PowerShell
Login to Exchange Online via these commands and add an alias via this command.
Connect-ExchangeOnline
Set-Mailbox "info" -EmailAddresses @{add="info2@365tips.be"}
On-premises, this can be done with the remote mailbox command:
Set-RemoteMailbox "info" -EmailAddresses @{add="info2@365tips.be"}
Also read
Restore a mailbox to another mailbox when deleting - Exchange Online
Restore Exchange e-mails - New Exchange Portal - Online
Install the new Exchange Online PowerShell V2 module
Mailbox management via Hybrid Exchange