See below what you will find in this article:
________________________________________________________________________________________________________________
Authentication: Microsoft
Follow the step-by-step guide on the following page: https://learn.microsoft.com/pt-br/entra/identity-platform/quickstart-register-app
- Keep the ObjectId and ApplicationId, as they will be used in later steps.
- In the step for adding credentials, create a client secret and save this information, as it will also be necessary for later steps.
Configure API permissions
In the application created, follow the step-by-step guide on the following page:
https://learn.microsoft.com/pt-br/exchange/client-developer/legacy-protocols/how-to-authenticate-an-imap-pop-smtp-application-by-using-oauth#useclient-credentials-grant-flow-to-authenticate-smtp-imap-and-pop-connections
And provide the following permissions:
-
IMAP.AccessAsApp -
SMTP.SendAsApp
After doing this, the administrator of your directory will need to create a Service Principal.
Create a service principal
1. Open an Azure PowerShell and install the ExchangeOnlineManagement module:
Install-Module -Name ExchangeOnlineManagement -AllowPrerelease
Import-Module ExchangeOnlineManagement
Connect-ExchangeOnline -Organization **<tenantId>**
2. Then, register the Service Principal for the application created earlier:
New-ServicePrincipal -AppId **<APPLICATION_ID>** -ObjectId **<OBJECT_ID>** [-Organization **<ORGANIZATION_ID>**]
Delegate permissions to the application
1. To grant permissions to the previously created application, first load the Service Principal using the following command:
Get-ServicePrincipal | fl
2. Now that you have the Service Principal Id, use the following command to grant mailbox permissions for the account the service will be using:
Add-MailboxPermission -Identity **"john.smith@example.com"** -User **<SERVICE_PRINCIPAL_ID>** -AccessRights FullAccess
Configuration in AEVO Innovate
-
Navigate to the SMTP Configuration page
-
Select Microsoft Authentication Type in the dropdown menu
Watch the video below describing the above process:
f9e8e494-d9c0-47c5-8e08-0ed052c7cd93.webm
Field dictionary:
-
Email address: Email for which mailbox permissions were granted
-
Name: The name that will appear as the sender
-
TenantId: TenantId used when creating the application in the first step
-
SMTP User: ApplicationId of the application created in the first step
-
SMTP Password: ClientSecret generated in the first step
Perform the email sending test make sure everything is correctly configured. If successful, you will receive a notification confirming that the test was performed successfully, and the email will arrive in the recipient’s inbox.