Microsoft Exchange and Office 365 Email Setup
Beginning in the second half of 2021, Microsoft requires email accounts to use an OAuth 2.0 authentication method. To configure a Microsoft email account with OAuth 2.0, complete the steps in this article to connect the account to Azure for appropriate authentication.
Prior to the second half of 2021, Microsoft email accounts can be configured with only an email account and password.
Configure Agiloft in Azure AD
Configuring Agiloft as an application in Azure AD requires registering your system with Azure, identifying the application as an authentication tool in Azure, and adding access permissions.
First, you need to register your Agiloft system with Azure. As you follow the steps, you can also refer to Microsoft's setup instructions if any of the options you see differ from those described here.
- Sign in to the Azure portal with the appropriate organization account.
- If your account has access to multiple tenants, select your account in the upper right corner and set your session to the appropriate AD tenant. For more information about tenants, see Microsoft's tenant documentation.
- Search for and select Azure Active Directory.
- Go to Manage > App registrations and select New registration.
- Enter a name for the registration. For example, you might name your registration " Agiloft Application for OAuth2."
- Select an option for who can use the application. This choice depends on how you use Azure. If you created an Azure account and tenant only for this purpose, select "Accounts in this organizational directory only."
- Leave the default Redirect URI settings.
- Click Register. The portal automatically directs you to the overview page for the Agiloft application.
With the application registered, you can gather the necessary identifying information to use the application with Azure as an authentication tool.
- In the sidebar, click Certificates & secrets.
- Click New client secret.
- Give the Client Secret a descriptive name, such as " Agiloft EWS Integration."
- Set it to never expire.
- Click Add. The secret now appears in the list.
- Copy the secret's value into a note or document.
- In the portal sidebar, click Overview to return to the overview page for the application.
- Copy the Application ID value into your note. This is the Client ID you need in Agiloft.
- Copy the Directory ID value into your note. This is the Tenant ID you need in Agiloft.
Before you leave the portal, add access permission for the application:
- Inside your Agiloft app registration, click Manifest on the sidebar.
requiredResourceAccessproperty in the manifest, and add the following inside the square  brackets:
- Click Save.
- Click API permissions in the sidebar.
- Confirm the
full_access_as_apppermission is listed.
- Click Grant admin consent, located next to the Add a permission button.
Configure Inbound Email in Agiloft
With the application registered and configured in Azure, you can use it to authenticate inbound email addresses in Agiloft. You must complete this setup for each inbound account that uses an Office 365 or Microsoft Exchange email address.
Refer to Inbound Email Accounts as you work. This article focuses on the settings that are unique to Azure authentication.
- Navigate to Setup > Email and SMS > Configure Inbound Email.
- Edit an inbound account from the list, or create a new one.
- On the Server tab:
- Select IMAP.
EWS:outlook.office365.com/ews/Exchange.asmxfor the address.
- Enable SSL/TLS connection.
- Set the custom port option to 443.
- On the Account tab:
- Enter the full email address.
- Leave the password field empty.
- Enter the Tenant ID, Client ID, and Client Secret you copied from your Azure application page.
- If you need to access multiple mailboxes with this configuration, you can do so on the Account tab with the Additional Users field. In the field, enter each additional email address, separating addresses with semicolons. For example:
firstname.lastname@example.org; email@example.com; firstname.lastname@example.org