MS Graph Account Configuration
Carrier can poll and send email using an Azure application and the Microsoft Graph API.
Polling emails using the Microsoft Graph API
The DovetailCarrierService.exe.config file defines connection details about the email accounts which Dovetail Carrier will check for email.
Specifically, the CarrierMsGraphAccounts
section defines email accounts that are to be polled using the Microsoft Graph API. You may enter more than one email account.
MS Graph Accounts
The required information for each account includes the username, clientId, clientSecret, and tenantId.
Example :
<account
username="support@company.com"
clientId="xxxx665e-xxxx-432e-xxxx-4e09681xxxx"
clientSecret="xxxxF7~5r6Rxxxx.xxxx4_~wqAX743xxxx"
tenantId="xxxx9085-xxxx-47d1-xxxx-e558e03axxxx"
/>
MS Graph Account Configuration Reference
Attribute | Required? | Description |
---|---|---|
username | Yes | Username for the email account to be polled |
clientId | Yes | Azure application client ID |
clientSecret | Yes | Azure application client secret |
tenantId | Yes | Azure application tenant ID |
Azure Application
In order to you the Microsoft Graph API, an Azure application needs to be setup/configured in the Azure Portal. Once the application is setup, the client ID and tenant ID will be made available.
Example :
From that overview page, click on the "Certificates & secrets" section to create a new client secret.
Azure Application API Permissions
Carrier needs the following API permissions in order to read, process, and send email:
- Microsoft Graph - Mail.ReadWrite
- Microsoft Graph - Mail.Send
Example :
Additional Azure Application settings
Additional settings and/or configuration may be desired, such as Conditional Access. This additional azure app configuration is outside the scope of Dovetail Carrier's configuration. Please consult with your Azure administrators for more information.
Sending emails using the Microsoft Graph API
Azure Application
In order to you the Microsoft Graph API, an Azure application needs to be setup/configured in the Azure Portal. Once the application is setup, the client ID and tenant ID will be made available.
Example:
From the overview page, click on the "Certificates & secrets" section to create a new client secret.
Azure Application API Permissions
Carrier needs the following API permissions in order to read, process, and send email:
- Microsoft Graph - Mail.ReadWrite
- Microsoft Graph - Mail.Send
Example:
Additional Azure Application settings
Additional settings and/or configuration may be desired, such as Conditional Access. This additional azure app configuration is outside the scope of Dovetail Carrier's configuration. Please consult with your Azure administrators for more information.
Carrier configuration
The DovetailCarrierService.exe.config file defines the configuration parameters necessary to send email. The following settings are specific to using MsGraph:
Parameter Name | Required? | Default | Description |
---|---|---|---|
EmailServiceSettings. Mode |
No | SMTP | Specify which mode Carrier uses for sending email. Supported Modes are SMTP, and MsGraph. If using the MsGraph API, this must be set to MsGraph |
EmailServiceSettings. MsGraphUserName |
Yes, if EmailServiceSettings.Mode is set to MsGraph | Username for the email account | |
EmailServiceSettings. MsGraphClientId |
Yes, if EmailServiceSettings.Mode is set to MsGraph | Azure application client ID | |
EmailServiceSettings. MsGraphClientSecret |
Yes, if EmailServiceSettings.Mode is set to MsGraph | Azure application client secret | |
EmailServiceSettings. MsGraphTenantId |
Yes, if EmailServiceSettings.Mode is set to MsGraph | Azure application tenant ID | |
MsGraphExecutorSettings. NumberOfRetries |
No | 3 | Number of retry attempts if a transient exception is detected. If a value greater than 3 is provided the effective value is forced to be equal to 3. |
MsGraphExecutorSettings. RetryDelayMilliseconds |
No | 2000 | How long to wait between retries in case a transient exception is detected. |
The emailAgentExtension.config file also contains configuration parameters that should align with the above settings:
Attribute | Required? | Description |
---|---|---|
EmailAgentExtensionSettings. EmailAccountUserName |
Yes | Email Agent will only process messages if the email account matches this value (or one of the values, if using a list of email addresses). Supports a comma-separated list of values, i.e. "account1@company.com,account2@company.com" For more information, review the EmailIsFromEmailAgentEmailAccount condition class. |
EmailAgentExtensionSettings. SendResponsesFromEmailAddress |
Yes | Email address from which email responses will be sent. |