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 (790 points)
0

Hello,

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.

0

I recently followed the instructions listd in the URL above.

[Reflection.Assembly]::LoadWithPartialName("Softerra.Adaxes.Adsi")

$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
$tenant.SetInfo()
0

Hello,

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

Trying to set the primary proxy when doing a name change on an email address.

asked Jul 13, 2023 by mightycabal (1.0k points)
0 votes
1 answer

Is it possible to connect to the Microsoft 365 Security & Compliance center through a PowerShell script? We are trying to configure users that belong to a ... department for a retention policy through the use of the Set-RetentionCompliancePolicy command.

asked Jan 3, 2022 by scoutcor (120 points)
0 votes
1 answer

Changing the "Forgot your password?" text.

asked Mar 10, 2020 by msylvester (60 points)
0 votes
1 answer

Greetings. When I create the parameters to make a business rule that looks for users whose Email Proxy Adresses does not contain 'SMTP:%userPrincipalName%', it still generates profiles ... and primary SMTP address don't match. Version is 2023 How rule is set

asked Dec 19, 2022 by MShep (80 points)
0 votes
1 answer

Hi: I am trying to create a business rule that will stop a value change based on the existing value. For example, if the telephonenumber is 1234 for a group and has to ... the value it uses is the incoming value of the change, not the existing value. Thanks!

asked Jun 3, 2022 by crobitaille (80 points)
3,551 questions
3,242 answers
8,241 comments
547,827 users