Are you looking to cut mailbox licensing costs for your Office 365 tenant? Well, look no further, and I will share a few ways for you to save money on Exchange Online licensing fees for your admin accounts that need to exchange e-mails.
So what do I mean by “admin accounts”?
In this case, the admin account (sometimes referred to as an ADM account) is a separate privileged account used by IT staff to perform their privileged duties. These account types are a standard security measure implemented in many companies, and in some cases, they need to be mail-enabled.
Some valid reasons for needing to mail enable an admins account is:
- To receive Microsoft Notifications.
- Third-party admin tools that don’t support alternative e-mail addresses.
- OTP messages sent to the account.
- Using the account UPN in places that require you to fill in an e-mail.
But mail enabling does not necessarily mean having to purchase a license for Exchange Online!
One way for you to avoid excessive licensing for Exchange Online is to redirected emails using Distribution Lists.
By redirection, I mean mail destined for your admin account goes to your regular non-privileged account instead.
Using Distribution Lists to redirect e-mail has several advantages:
- Easy to set up with PowerShell or EAC.
- Redirect without storing a copy.
- Supports “send as” or “on behalf.”
- Supports “Hide from Global Address List.”
- Generates the least amount of system clutter.
- No license consumption required!
You might be wondering why this single problem had med choose Distribution Lists over other tried-and-true solutions? I explain that and other solutions, at the end of this article. It’s up to you to decide if you think another solution is a better fit for your organization.
Now that most of the admin portals in Microsoft 365 and Azure no longer required admins to have an active license assigned. You cloud be looking into removing Exchange Online Licensing from your admin accounts and switching to Distribution List redirection or similar solutions to save money.
The solution
I have opted into using PowerShell for this solution, but you could use the Exchange Admin Center instead. This is, however, not explained in this blog post.
The following PowerShell code should get you off to a good start. Use it to build a neat solution in Azure Automation, and have it execute every time you add a new admin account. That is sure to impress the boss!
Automation is king – only your imagination will limit you…
The requirements
- Azure Subscription (free is sufficient).
- Alternatively, connect using the Exchange Online PowerShell Module V2.
- Exchange Online Administrator Privileges.
- A basic understanding of PowerShell script variables.
The steps
- Log on to Azure Cloud Shell via https://shell.azure.com
- Run the command: Connect-exopssession

After completing the above steps, you can interact with Exchange Online PowerShell.
Before you go off and execute the script below, you first need to understand the variables that it uses.
$adminMail = "[email protected]" $userMail = "[email protected]" $name = ($adminMail -replace "@","_").Replace(".","-") New-DistributionGroup -Name "Redirect for $name" -Alias "$name`_admin" -PrimarySMTPAddress "$($adminMail)" -ManagedBy "$userMail" -CopyOwnerToMember -MemberDepartRestriction "Closed" -MemberJoinRestriction "Closed" Set-DistributionGroup "Redirect for $name" -HiddenFromAddressListsEnabled $true -GrantSendOnBehalfTo "$userMail" -RequireSenderAuthenticationEnabled $false
You will need to modify the variables in the script above, according to your requirements.
- $adminMail. This variable is the e-mail address you wish to assign to the Distribution Group. This should be the same as the UPN address of the admin account.
- $userMail. This variable is the non-privileged account e-mail. This account must have an Exchange mailbox and should only belong to the same person owning the admin account if you like staying compliant.
- $name. This variable is my way of auto-generating a name for the Distribution List; you can modify it if you like, but you must understand the impact yourself.
Troubleshooting
- No e-mail coming through from the Internet.
- Unfortunately, it can take a while for your newly created Distribution Lists cleared for unauthenticated external e-mail. So, give it some time.
- Admin e-mail address already in use in the organization?
- If you previously had this e-mail address receiving e-mail, you will need to track down the location of the e-mail attribute and remove it from whatever crevice it resides in – e-mail addresses are unique throughout Exchange Online.
- Remember to back up any existing mail data if you already had a license assigned to the admin account.
- Unable to remove the Exchange Online license from the admin account.
- You might have group-based licensing enabled in your tenant.
Other solutions – pros/cons
As with all things Microsoft, there are several ways to achieve a solution to a problem, so in the spirit of sharing my thoughts, here are some other possible solutions.
Please keep in mind that you might be required to adhere to specific compliance requirements, such as accountability, traceability, retention, backup licensing, exit strategies, and separation of privileges.
Security compliance is why I ended up choosing Distribution Lists. Also because they have the smallest footprint vs. usability.
Final words
In a perfect world of E5 licensing, you could use Azure PIM to consolidate users. And I often recommend this, unless you have strict requirements to separate all administrative access as some services will not yet integrate neatly with your Azure Identity and Conditional Access. So a classic separation of accounts with privileged access can still be required.
As always, I hope you find inspiration in this article. And I welcome any feedback in the comments or on twitter @michael_mardahl.
(2516)
Add comment