0 votes

Can Adaxes verify the email address and if it existings add a number?

I am testing what happens if duplicate accounts exist. I get this error if trying to create an account with duplicate information.

Softerra.Adaxes.BackgroundThreadException: Exchange Edge PowerShell API: Failed to execute the following operation: Enable remote mailbox for 'Skywalker, Luke (site.com\users)' ---> System.Management.Automation.RemoteException: The proxy address "smtp:skywall@tenant.mail.onmicrosoft.com" is already being used by the proxy addresses or LegacyExchangeDN of "site.com/Change Management/Skywalker, Luke". Please choose another proxy address. at #Dh.#Jh.#l.#5w.#VZc(RunspacePool runspacePool, PSCommand psCommand, String[]& warnings) at #Dh.#Jh.#l.#5w.Execute(RunspacePool runspacePool, #Gh command) at #ik.#Lk.Execute(#Gh command) at #ik.#Ik.#VZc(#Gh command, #uy context) at #ik.#Fk.#VZc(#Gh command, #uy context) at #ik.#Fk.#XOc(#mn operation) at #9m.#nn.Execute() --- End of inner exception stack trace ---

by (5.6k points)


The error occurs because the remote routing address that is used to create a remote mailbox is already reserved. For us to provide you with a solution, please, post here or send us (support[at]adaxes.com) the template you currently have configured for remote routing addresses. If the template is configured for your Microsoft 365 tenant in Adaxes, you can check it using the script from section Viewing Current Settings of the following help article: https://www.adaxes.com/help/?HowDoI.PerformExchangeTasks.ConfigureEnablingDisablingOfRemoteMailboxes.html.


I recently followed the instructions listd in the URL above.


$tenantName = "Company" # TODO Modify me
$remoteRoutingAddressTemplate = "%lastname:lower,6%%firstname:lower,1%@cp0.mail.onmicrosoft.com" # TODO Modify me

# Bind to Adaxes service
$admNS = New-Object "Softerra.Adaxes.Adsi.AdmNamespace"
$admService = $admNS.GetServiceDirectly("localhost")

# Prompt for credentials of a service administrator
$credential = Get-Credential

# Bind to the configuration container
$configurationContainerPath = $admService.Backend.GetConfigurationContainerPath("CloudServicesO365")
$configurationContainer = $admService.OpenObject($configurationContainerPath, $credential.UserName,`
    $credential.GetNetworkCredential().Password, 0)

# Get tenant
$tenant = $configurationContainer.GetObject("adm-O365Tenant", "CN=$tenantName")

# Update parameter
$tenant.RemoteMailboxesRemoteRoutingAddress = $remoteRoutingAddressTemplate

# Save changes


Thank you for specifying. To achieve the desired, you can do the following:

  1. Use a specific property to store the suffix (%lastname:lower,6%%firstname:lower,1%) for the remote routing address via a Property Pattern. For example, you can use one of Adaxes custom text attributes (e.g. CustomAttributeText1).
  2. Update the remote routing address template to use the property. It should be done using the script you provided with the $remoteRoutingAddressTemplate variable specified like the following:
     $remoteRoutingAddressTemplate = "%adm-CustomAttributeText1%@cp0.mail.onmicrosoft.com" # TODO Modify me
  3. Use a Business Rule triggering Before creating a user that will execute a script to check whether the suffix stored in the property is already in use for an email address ending with cp0.mail.onmicrosoft.com. If it is, a digit will be added to the property value and the new value will then be used for the remote routing address when creating a remote mailbox.

Does the approach meet your needs?

Please log in or register to answer this question.

Related questions

0 votes
1 answer

Changing the "Forgot your password?" text.

asked Mar 10 by msylvester (650 points)
0 votes
1 answer

We have a single AD domain that also matches our primary email domain (e.g. @primarydomain.com), but we also have multiple company specific email domains (e.g. @companydomain. ... like to also link the companydomain.com to the user's company value set in AD.

asked Apr 29 by JacquesKruger (250 points)
0 votes
1 answer

In the web interface, I would like to display the "Distinguished Name" property but it is not showing it as it would when using ADUC or even in the Adaxes Admin Console. Is ... I would like it to display like this: CN=Mark Smith,OU=Sales,DC=Fabrikam,DC=COM

asked Jan 15 by mark.it.admin (4.3k points)
0 votes
1 answer

I would like to add a parameter for country to a custom command. Since the country has to be entered correctly in order for Active Directory to accept it, I would like to ... ? I didn't find it in the documentation and the sample scripts didn't use parameters.

asked Jun 4 by mark.it.admin (4.3k points)
0 votes
1 answer

Hello, I have created a business rule to create Office 365 Mailboxes and set certain properties: adm-customattributeBoolean1 has a friendly name of "create Exchange Online mailbox?" adm- ... out the SMTP values created by my rule. How to I get around this?

asked Feb 23, 2015 by DFassett (4k points)
2,294 questions
2,048 answers
58,827 users