After following the process outlined at https://www.adaxes.com/help/ConfigureMailSettings/#exchange-app-auth, I enter in the smtp server, port 587, the server requires authentication, Microsoft Entra App credentails, Application (client) id, Directory (tenant) id and client secret. When I try to click Ok or Test Settings, the admin console hangs and eventually crashes. I am confident I have the service princiapl setup with the permissions correctly.

Is there anywhere I can troubleshoot or see a log of what is causing the console to crash? I checked the event viewer, nothing. Checked the adaxes logging, nothing.

Any help is apprecaited. Thank you!

by (160 points)
by (305k points)
0

Hello,

For troubleshooting purposes, please, provide a screenshot of the mail settings you configured. Also, please, provide us with a screenshot of the Multi-server environment dialog. The dialog displays how many Adaxes services you have and what their versions are. For information on how to view it, see https://www.adaxes.com/help/MultiServerEnvironment. You can post the screenshots here or send to us at support@adaxes.com.

by (160 points)
0

We have a single Adaxes service running. image.png

Here is the app credentails setup. image.png

Here are the mail settings image.png

When I ran the PowerShell from the reference link, I made sure to give the service principal full access to the do-not-reply mailbox and ensure that the mailbox is licensed. When I click the "test settings" or ok, that is when the console crashes and the settings do not save. I have tried with the SSL setting check and unchecked. Results were the same.

I have been able to verify the sucessful login using the client secret with the service principal in Entra id logs.

by (305k points)
0

Hello,

For troubleshooting purposes, please, try setting mail settings using the below script. If it completes with the Mail settings not saved message, please, send us (support@adaxes.com) the output file. If the script is executed successfully, try testing the mail settings in the Administration console. The script should be executed in PowerShell 7 on the computer where Adaxes service runs. In the script:

  • $reportFilePath – the path to a text file that will be created by the script in case of any issue saving mail settings.
  • $clientId - the Application (client) ID of the Microsoft Entra app.
  • $tenantId - the Directory (tenant) ID of the Microsoft Entra app.
  • $clientSecret - the client secret of the Microsoft Entra app.
  • $from - the From address you used in mail settings (starts with do-not-reply according to your screenshot).
Import-Module Adaxes

$reportFilePath = "C:\Scripts\Report.txt" # TODO: modify me
$clientId = "<clientId>" # TODO: modify me
$tenantId = "<tenantId>" # TODO: modify me
$clientSecret = "<clientSecret>" # TODO: modify me
$from = "<from>" # TODO: modify me

$smptServer = "smtp.office365.com"
$port = "587"

# Connect to the Adaxes service.
$ns = New-Object "Softerra.Adaxes.Adsi.AdmNamespace"
$service = $ns.GetServiceDirectly("localhost")

# Bind to the Service Settings container.
$wellknownContainerPath = $service.Backend.GetConfigurationContainerPath("ServiceSettings")
$serviceSettings = $service.OpenObject($wellknownContainerPath, $null, $null, 0)

# Get mail settings
$mailSettings = $serviceSettings.MailSettings

# Set MailSettings
$mailSettings.Host = $smptServer
$mailSettings.Port = $port
$mailSettings.From = $from

# Create the credentials object.
$credentials = New-Object "Softerra.Adaxes.Management.AdmSmtpEntraIdAuth"
$credentials.ClientId = $clientId
$credentials.TenantId = $tenantId
$credentials.ClientSecret = $clientSecret

# Set credentials.
$mailSettings.SmtpAuth = $credentials

$validationErrors = @()
try 
{
    $mailSettings.ValidateAuthentication($credentials)
}
catch 
{
    $validationErrors += "ValidateAuthentication: " + $_.Exception.Message
}

try 
{
    $mailSettings.ValidateSmtpServer($smptServer, $port)
}
catch
{
    $validationErrors += "ValidateSmtpServer: " + $_.Exception.Message
}

try 
{
    $mailSettings.ValidateFromMail($from)
}
catch 
{
    $validationErrors += "ValidateFromMail: " + $_.Exception.Message
}

if ($validationErrors.Length -gt 0)
{
    $validationErrors | %{$_ | Out-File $reportFilePath -Append}
    Write-Warning "Mail settings not saved. See $reportFilePath."
    return
}

# Save changes
$mailSettings.Save()
Write-Host "Mail settings saved successfully." -ForegroundColor Green

Please log in or register to answer this question.

Related questions

Any chance there is support for configuring mail settings in adaxes using HTTP Graph API integration instead of Exchange Online SMTP?

asked Jul 10 by emeisner (160 points)
0 votes
1 answer

Hello All, it is possible to configure SMTP mail setting using Exchange Online with modern authentication and Azure security defaults enabled? Currently I have setup local IIS ... defaults but I would like to connect to my more secured tenant. Regards Ivaylo

asked Dec 6, 2022 by ivaylo.valkov (100 points)
+1 vote
1 answer

ADAXES version is 3.13.18106.0 trying to set up "outgoing email server" for email notification. We are using google smtp-relay which require "SSL" After setting it ... their own credentials, such as the internet information server, are not affected by this."

asked May 20, 2021 by justinh (60 points)
0 votes
0 answers

In the Adaxes Administration Console, when I try to add a specific user to either "Administrators" or any Security Role, the Select dialogue box can't find it. I ... console can find without issue and all the permissions on the user object are the same.

asked Jun 4 by jmatthews (250 points)
0 votes
0 answers

Hello, Is there a way I can make the Desktop Adaxes Admin Console Dark Themed? I know how to on the Web Interface, but wondered for the full console. Thanks!

asked Nov 19, 2023 by Edogstraus00 (570 points)
+1 vote
1 answer