Having recently setup Microsoft HVE for mail relay via client submission it was now time to update the settings on the approx. 40 apps that relay on my network.
To start with it's worth noting a few things with HVE. Currently, it doesn't support OAuth, but will in September 2024 when it is fully released. It only supports TLS 1.2 and 1.3, so any apps that haven't been updated in a while may only support a lower version.
Server/Endpoint: smtp-hve.office365.com
Port: 587
TLS: STARTTLS
TLS 1.2 and TLS 1.3 are supported
Authentication: Username and password
OAuth not supported in preview
Port: 587
TLS: STARTTLS
TLS 1.2 and TLS 1.3 are supported
Authentication: Username and password
OAuth not supported in preview
I had already done some checks to verify that only a couple didn't support a username and password, but what I didn't realize is that's only half the story.
If an app defaults to port 465 for SSL then it doesn't support client submission (port 587), this occurred on the first app I checked, Tree Size Pro.

↑ TreeSize Pro defaults to port 465 for SSL, it does not support client submission.
From there it got even worse, apps that don't have a test button, apps that seem to have the correct settings but then give a basic error message without the needed detail to troubleshoot.
On the server itself, you also need to make sure that port 587 is not blocked by the Windows Firewall.
The first app I did get to work was Nessus by Tenable.

↑ Lots of authentication methods with Nessus.

↑ All apps should have a 'Send Test Email' button, but many don't.
With scripts, it is possible to send to HVE but there are a few things to check. PowerShell by default will not use TLS 1.2 so you will need to add the following to your script.
[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]::Tls12
A working example using PowerShell, with HTML body and an attachment:
# Before starting you want to save your credentials encrypted
$credential = Get-Credential
$credential | Export-CliXml -Path 'C:\scripts\creds.xml'
$credential = Get-Credential
$credential | Export-CliXml -Path 'C:\scripts\creds.xml'
$creds = Import-CliXml 'c:\scripts\creds.xml'
$EmailTo = "user@domain.com,user2@domain.com"
$EmailFrom = "relay@domain.com"
$Subject = "Test"
$body = "HTML mail"
$SMTPServer = "smtp-hve.office365.com"
$file = "c:\scripts\hvetest.txt"
$att = new-object Net.Mail.Attachment($file)
$SMTPMessage = New-Object System.Net.Mail.MailMessage($EmailFrom,$EmailTo,$Subject,$Body)
#$SMTPMessage.cc.Add("user3@domain.com")
#$SMTPMessage.bcc.Add("user4domain.com")
$SMTPMessage.IsBodyHtml = $true
$SMTPMessage.Attachments.Add($att)
$SMTPClient = New-Object Net.Mail.SmtpClient($SmtpServer, 587)
$SMTPClient.EnableSsl = $true
$SMTPClient.Credentials = $creds
$SMTPClient.Send($SMTPMessage)
$EmailTo = "user@domain.com,user2@domain.com"
$EmailFrom = "relay@domain.com"
$Subject = "Test"
$body = "HTML mail"
$SMTPServer = "smtp-hve.office365.com"
$file = "c:\scripts\hvetest.txt"
$att = new-object Net.Mail.Attachment($file)
$SMTPMessage = New-Object System.Net.Mail.MailMessage($EmailFrom,$EmailTo,$Subject,$Body)
#$SMTPMessage.cc.Add("user3@domain.com")
#$SMTPMessage.bcc.Add("user4domain.com")
$SMTPMessage.IsBodyHtml = $true
$SMTPMessage.Attachments.Add($att)
$SMTPClient = New-Object Net.Mail.SmtpClient($SmtpServer, 587)
$SMTPClient.EnableSsl = $true
$SMTPClient.Credentials = $creds
$SMTPClient.Send($SMTPMessage)
While I could ask the script owners to use Graph instead, the above code is easier to edit.