How to solve the issue generated by newly introduced aliases (proxy addresses) limit.


Since the beginning of September 2016, Product Engineering Team limits the number of recipient aliases (proxy address) to 200.
Office 365 is a shared environment. All the changes to the product are made to improve customer’s experience. In this way, our goal is to deliver a “better every time” experience for all Office 365 customers.

This new limit is published in the following article: Exchange Online Limits – https://technet.microsoft.com/en-us/library/exchange-online-limits.aspx?f=255&MSPPError=-2147217396. My recommendation is to visit this page every time you want to be sure you have the latest information about Exchange Online Limits. Because Office 365 is a product in a continuous transformation, the content of the page is constantly updated. Please make sure you visit this page before opening a request to Office 365 Support Teams.

If you want to add (proxy addresses) to a recipient, the following article can be helpful: Add additional email aliases to a user in Office 365 – https://support.office.com/en-us/article/Add-additional-email-aliases-to-a-user-in-Office-365-0b0bd900-68b1-4bf5-808b-5d240a7739f4. In this article we also find information about the alias limit: You can create up to 200 aliases for a user. No additional fees or licenses are required.

Another interesting article is the following: Add or remove email addresses for a mailbox – https://technet.microsoft.com/en-us/library/bb123794(v=exchg.160).aspx
To be able to connect with PowerShell to Exchange Online, a useful article is the following: Connect to all Office 365 services in a single Windows PowerShell window – https://technet.microsoft.com/en-us/library/dn568015.aspx. In this article you will find info about the connection to all Office 365 services (Office 365 admin center, SharePoint Online, Exchange Online, Skype for Business Online, and the Security & Compliance Center). In our case, you will need to connect only to Exchange Online.

If you want to use PowerShell, to add / remove aliases (proxy addresses) you can use the following commands:

Set-Mailbox <mailbox_name> -EmailAddresses @{add=”new_alias@contoso.com”}
Set-Mailbox <mailbox_name> -EmailAddresses @{remove=”old_alias@contoso.com”}

If you already added more that 200 aliases (before limit’s introduction), you will get an error message similar with the below example:

Set-Mailbox <mailbox_name> -EmailAddresses @{add=”new_alias@contoso.com”}

There are too many proxy adresses: 429, and maximum supported number of recipient proxy addresses is 200.
+ Categorylnfo: NotSpecified: (retail:ADObjectId)[Set-Mailbox], DataValidationException
+ FullyQualifiedErrorId: [Server=HE1PR03MB1730, RequestId=8bdd0ca2-5b37-471e-bdc6-e0a4w2bed76d,TimeStamp=9/9/2016 12:34:56 AM] [FailureCategory=Cmdlet-DataValidationException] 7452127, Microsoft.Exchange.Management.RecipientTasks.SetMAilbox
+ PSComputerName: outlook.office365.com

To help customers that encountered this error (have more than 200 aliases added to a mailbox) after the limit was introduced, I wrote a script that provides a solution.
The script is published in Microsoft’s TechNet Gallery: https://gallery.technet.microsoft.com/office/Over-200-aliases-da06ad0b

The script performs the following steps:
– if the user/password for connecting to Exchange Online with PowerShell were not provided, will ask for them and will connect;
– if the affected mailbox name is not provided, will ask for it;
– if the provided mailbox name is not part of the tenant, will prompt you to enter mailbox name again;
– if the TXT output path was not provided, will set it to C:\Temp\ExoVoice\ If the folder does not exits, the script will create it;
– read all aliases (to be sure you will not loose them) and backup them in a TXT file: c:\temp\ExoVoice\<DateTimeStamp>_<affected_mailbox>_Mail_Addresses.txt;
– will delete all addresses, adding only the primary SMTP one to the mailbox;
– will add all non SMTP addresses to the mailbox (X500, x500, x400, SIP, …)
– will create one DistributionList for each 150 secondary proxy address, adding the affected mailbox as a member in each DistributionList

Script parameters:
O365Admin -> Administrator login ID
O365AdminPassword -> Administrator login password
Mailbox_Name -> mailbox with more than 200 aliases
Mail_Addresses_File_Path -> the path where the file with initial addresses list is saved
prx_addr_split = 150 -> number of aliases to be added per DL. We recommend to be set at 150. You can modify it, but please test it in a non production environment.

The script can be run the the following way:
.\Over_200_Aliases.ps1 [-O365Admin <smtp/alias>] [-O365AdminPassword <Password>] [-Mailbox_Name <MaiboxName>] [-Mail_Addresses_File_Path <FilePath>]

2 examples:
– running the script with all needed parameters:
.\Over_200_Aliases.ps1 -O365Admin admin@xxxxxx.onmicrosoft.com -O365AdminPassword Password123 -Mailbox_Name mailbox1 -Mail_Addresses_File_Path “C:\Temp\ExoVoice\”
– running the script with no parameters:
.\Over_200_Aliases.ps1

At the end of the script, you will find a commented block of commands that can help you add 190 aliases to a mailbox. This can help you test the script on a test mailbox before running it on a production mailbox.
********************
********************
********************
NOTE1: This script will help you only if local AD is not synced to AAD. If you are syncing AD to O365, some changes need to be done on premises and this script cannot help you.
This script will not help you if you have a Hybrid Configuration and the user was created in on-prem environment.
********************
NOTE2: There is no need to run this script if you have less that 200 aliases.
********************
NOTE3: Before using the script, please read the Microsoft Disclaimer:
********************
The sample scripts are not supported under any Microsoft standard support program or service. The sample scripts are provided AS IS without  warranty of any kind. Microsoft further disclaims all implied warranties including, without limitation, any implied warranties of merchantability or of fitness for a particular purpose. The entire risk arising out of the use or performance of the sample scripts and documentation remains with you. In no event shall Microsoft, its authors, or anyone else involved in the creation, production, or delivery of the scripts be liable for any damages whatsoever (including, without limitation, damages for loss of business profits, business interruption, loss of business information, or other pecuniary loss) arising out of the use of or inability to use the sample scripts or documentation, even if Microsoft has been advised of the possibility of such damages.
********************

Comments (0)

Skip to main content