0

I have an Azure AD user (bob@contoso.com) and want to redirect all this users email to an external address (bob@external.com).

I have set up other redirects by creating a new MailUser and setting the externalEmailAddress property. For example we have a MailUser support@contoso.com with an externalEmailAddress = support@external2.com. This works well and all emails sent to support@contoso.com are redirected to support@external2.com, but support@contoso.com did not exist in AzureAD before creating the MailUser.

If we try to create a new MailUser in Exchange Online for bob@contoso.com an error occurs because the user already exists.

If I use the Get-User commandlet in ps the RecipientType for bob = User and support = MailUser.

How can I setup an Azure AD user to be a MailUser with redirect to an external address in Exchange Online?

With an on-premises exchange server this would be done using the Enable-MailUser commandlet, but this is unavailable in Exchange online.

2 Answers2

0

You want to set the same alias for the mailbox and mail user, and this will cause this error. As a workaround, we could create mail contact with the same Bob, this also can be set as forwarding email address. Based on my test on my side, it works.

enter image description here

Jayce
  • 769
  • 4
  • 5
  • In addition, there are many ways to forward the emails, for example, set forwarding emailaddress in OWA, outlook/owa rule, transport rule and so on. – Jayce Oct 23 '19 at 06:47
  • Currently the user is only in Azure AD and does not have a mailbox or Office365 license assigned. The other MailUser we set up for redirect to external address did not require a full mailbox and we would like to achieve the same with this user. – Tom Waddell Oct 23 '19 at 09:19
0

For this particular Azure AD user, it was determined that they were not using the account for any other services. The account was only being used for mail forwarding.

The solution was to delete the Azure AD user. Then in Exchange Online a new MailUser could be created for bob@contoso.com successfully.