# Office 365 · Accounts · Email · Admin Portal

Configure an OAuth mailbox connection. Check the compatibility warning and troubleshoot consent issues.

Canonical: https://docs.mintsd.com/docs/mint-service-desk/admin-portal-office-365
Language: en-GB
Revision: 2a2d39f1e31deba465d9905cd685a5a3416966a588eb6151bba19ba5bc3c7cc9

<a id="element-01a18bf4-9678-765f-9ee8-7d853409339e"></a>

**IMPORTANT!**

<a id="element-01a18bf4-9679-7f60-8911-c771aacdd21c"></a>

**The outlook.office.com IMAP/SMTP with OAuth integration is based on a legacy model with limited and gradually restricted support. Microsoft recommends migrating to the Microsoft Graph API for improved reliability, security, and long-term compatibility. Continued use of IMAP/SMTP OAuth may result in reduced functionality or service disruptions in future updates.**

<a id="element-01a1452e-1469-7928-82c1-03353bd0b52f"></a>

Use the following example to configure Office 365. Open a private or incognito browser window first, as explained in the OAuth2 section.

<a id="element-01a1452e-1469-7ffc-a94d-8eb2528dde4f"></a>

![Use the following example to configure Office 365. Open a private or incognito browser window first, as explained in the OAuth2 section.](https://docs.mintsd.com/api/reader/assets/assets/images/image900.png?v=01d2295e24b9a6ef2f142f71907220b0377fdf3541c245e45b646a28f2b90657)

<a id="element-01a1452e-146a-7897-8c0a-8b50b071f09c"></a>

## Registering the application

To begin configuration, the user must register the application. To do this, go to ‘<https://portal.azure.com/>’
and then log in to your account. When the login process is successful, select ‘App registrations’ from the
left menu. When the window opens click on ‘New registration’.

<a id="element-01a1452e-146a-764d-a256-549525739ed0"></a>

![Office 365: To begin configuration, the user must register the application.](https://docs.mintsd.com/api/reader/assets/assets/images/image901.jpg?v=dd495718ae50bb625e4c4a01a7544e1124bd12522e0cbf31b6744923c394ed00)

<a id="element-01a1452e-146b-7a65-8ea5-968e1a21664e"></a>

In order to configure your application correctly, you must first enter an application name. Then in the
‘Supported account types’ section select ‘Accounts in any organizational directory (Any Azure AD directory - Multitenant)
and personal Microsoft accounts (e.g. Skype, Xbox)’ and in the ‘Redirect URI (optional)’ section select ‘Web’ and paste the
Redirect Uri from the email account creation page.

<a id="element-01a1452e-146c-7684-99b9-0d25a082273d"></a>

Then you need to press the ‘Register’ button.

<a id="element-01a1452e-146c-7ed1-9f45-4eedcc2e69e4"></a>

![Office 365: Then you need to press the ‘Register’ button.](https://docs.mintsd.com/api/reader/assets/assets/images/image902.jpg?v=e3c23f0aad3c57a8fd091e28ba562ee93ee1fdd5ba61a169f72e9d21e1aef444)

<a id="element-01a1452e-146e-7655-9886-4298110f6cf3"></a>

Once the button is pressed and the new application is successfully registered, the user will be taken to a summary page where he/she must copy the ‘Application (client) ID’

<a id="element-01a1452e-146e-722e-b192-39c8818b91b0"></a>

![Once the button is pressed and the new application is successfully registered, the user will be taken to a summary page where he/she must copy the ‘Application (client) ID’.](https://docs.mintsd.com/api/reader/assets/assets/images/image903.jpg?v=429d85909f1cb9bb5b77d3fecbd1f96b8afaddbe04789107dd95249d8f6384a3)

<a id="element-01a1452e-146f-7030-9b67-f20767640a0e"></a>

The copied code, the user must paste into the mint configuration in the ‘Client id’ field.

<a id="element-01a1452e-1470-7aa6-b924-960988e635a4"></a>

![The copied code, the user must paste into the mint configuration in the ‘Client id’ field.](https://docs.mintsd.com/api/reader/assets/assets/images/image904.png?v=f83bee16d43a94ff98cb913c7b777df86a585c36450345e5e1e978a87d32c3e2)

<a id="element-01a1452e-1471-77a4-9294-f7eb8d5cdbc7"></a>

## Permissions

The next step is to add permissions. To do this, the user must press the ‘API permissions’ option on the sidebar and then select ‘Add a permission’ on this window.

<a id="element-01a1452e-1471-72b9-b13c-c7ee1f3efee3"></a>

![The next step is to add permissions. To do this, the user must press the ‘API permissions’ option on the sidebar and then select ‘Add a permission’ on this window.](https://docs.mintsd.com/api/reader/assets/assets/images/image905.jpg?v=f0072ebcf683dda948d1d288caa7dd090abeb0bb5ba4670766d9e6bde934ca04)

<a id="element-01a1452e-1473-7036-af35-45cd1ef932a6"></a>

After pressing the button, press the ‘Microsoft Graph’ option.

<a id="element-01a1452e-1473-76df-84bf-3bc8971a4104"></a>

![Office 365: After pressing the button, press the ‘Microsoft Graph’ option.](https://docs.mintsd.com/api/reader/assets/assets/images/image906.jpg?v=d3062642bdb5061be3925d1950067807d2db7b30480856bfbac3c554ac21cf07)

<a id="element-01a1452e-1474-7d84-af6f-7f2219065442"></a>

Select ‘Delegated permissions’ and check these options:
- IMAP.AccessAsUser.All
- SMTP.Send
- offline_access

<a id="element-01a1452e-1475-7da6-a540-5e9a695cf2bf"></a>

And then press the ‘Add permissions’ button.

<a id="element-01a1452e-1475-719e-9ed0-b9246bbafc50"></a>

![Office 365: And then press the ‘Add permissions’ button.](https://docs.mintsd.com/api/reader/assets/assets/images/image949.png?v=fc7068ff887745f3100faff97d8aa6cf70a6f95d47b42c24404cf392b4154008)

<a id="element-01a1452e-1476-70a2-adf5-371424d24eef"></a>

## Client secret

The next step is to go to ‘Certificates & secrets’ which is located on the left sidebar. Then you need to press the ‘New client secret’ button.

<a id="element-01a1452e-1477-70b1-923b-7db6538ea2a4"></a>

![The next step is to go to ‘Certificates & secrets’ which is located on the left sidebar. Then you need to press the ‘New client secret’ button.](https://docs.mintsd.com/api/reader/assets/assets/images/image908.jpg?v=529cb6db26fbcd6bf00307997b54559279b368ebee1fbc2b04ad6a67264ca323)

<a id="element-01a1452e-1477-718f-9cfe-55e8bae8280a"></a>

Add a description and press the ‘Add’ button.

<a id="element-01a1452e-1477-777e-b58b-52405302040a"></a>

![Office 365: Add a description and press the ‘Add’ button.](https://docs.mintsd.com/api/reader/assets/assets/images/image909.jpg?v=f166d79df5594f6ec67c703551a4fdd895c19b6907f33d8b72699f2cf37e5b19)

<a id="element-01a1452e-1478-7899-9aba-9d81d5c16f5f"></a>

**Remember to enable SMTP Authentication. More information at this link: https://docs.microsoft.com/en-us/exchange/clients-and-mobile-in-exchange-online/authenticated-client-smtp-submission**

<a id="element-01a1452e-1478-7605-a6b5-88726f6a8570"></a>

The user will be taken to the summary. Remember to copy the ‘Value’ field because when you refresh the page, this field will be hidden.

<a id="element-01a1452e-1479-7c54-b5b0-a797a1773cb8"></a>

![The user will be taken to the summary. Remember to copy the ‘Value’ field because when you refresh the page, this field will be hidden.](https://docs.mintsd.com/api/reader/assets/assets/images/image910.jpg?v=a7523a4744bc120c46b7752cbc40cc01e37547fed777af575b43365ef9f6728c)

<a id="element-01a1452e-1479-7bd8-921d-eeeb02ac6dd8"></a>

The copied value should be pasted into the MINT configuration in the ‘Client secret’ field.

<a id="element-01a1452e-1479-7fda-8b2f-514cec026df1"></a>

![The copied value should be pasted into the MINT configuration in the ‘Client secret’ field.](https://docs.mintsd.com/api/reader/assets/assets/images/image911.png?v=0875b0625a75f1e902d74fc94bb42fa22ddf04b55e77ac46c7c7af33b2e395a1)

<a id="element-01a1452e-147a-7692-b9ff-d8e9e714ad08"></a>

## Saving the connection

To complete the configuration of MINT, select ‘IMAP’ in ‘Receive protocol’ and in the ‘Email address’
field enter the Microsoft Office 365 address from which the configuration was performed.

<a id="element-01a1452e-147b-718e-afed-a4bea87873b0"></a>

To complete the configuration process, press the ‘Save’ button. After pressing it the user will be
redirected to Outlook login form. If all the information is correct, the system should connect to Microsoft Office 365 via OAuth2.

<a id="element-01a1452e-147b-7fe4-b82f-8fbe8c2ef6c6"></a>

After saving, the Redirect URL changes from the ‘create’ endpoint to an ‘edit’ endpoint containing the account’s UUID. Add this URL to the application’s redirect settings in Azure or your OAuth2 provider’s portal.

<a id="element-01a1452e-147c-7441-b03a-236cc5e8d724"></a>

The sample Redirect URL can look like this below:

<a id="element-01a1452e-147c-7dba-8f68-cc0423bd4707"></a>

![Office 365: The sample Redirect URL can look like this below:](https://docs.mintsd.com/api/reader/assets/assets/images/image988.png?v=006c9ade6ee1af5a03126e2a2cdd32d546ec2a97f9ac2ba9be759b1894533358)

<a id="element-01a18bf4-9695-736b-968d-5634b408dc74"></a>

**Note:**

<a id="element-01a1452e-147d-7dbd-a8f4-b30966c968d4"></a>

Keep in mind that some OAuth2 providers only allow you to generate one refresh token per config. Because of this restriction, you may get an error that you cannot connect to the mailbox. In this case, review the documentation of the provider you are using.

<a id="element-01a18bf4-9696-7378-9316-5961e1e04257"></a>

## Connection troubleshooting

**Note:**

<a id="element-01a18bf4-9696-7ec9-b7d9-3a4e7b6f9c06"></a>

If you are still unable to connect your mailbox despite applying the settings described above, ask your application administrator to perform the following steps:

<a id="element-01a18bf4-9697-7cb6-8b14-21f36f8d66c2"></a>

Step 1: Navigate to the following section in Microsoft Entra ID:

<a id="element-01a18bf4-9698-71cf-91e1-b7018ad7c8fe"></a>

Home > Manage > Enterprise applications

<a id="element-01a18bf4-9699-75f3-b0c8-e82198a98eea"></a>

![Office 365: Home > Manage > Enterprise applications](https://docs.mintsd.com/api/reader/assets/assets/images/image1484.png?v=8bef73dcc96ceec91e440d587c81e2dd2bb10788b168e509c56f24d48cfed2fb)

<a id="element-01a18bf4-969b-7fdd-aee0-5c101bafc1e4"></a>

Then, go to Security > Consent and permissions.

<a id="element-01a18bf4-969c-7d84-b872-9f30b0400686"></a>

![Office 365: Then, go to Security > Consent and permissions.](https://docs.mintsd.com/api/reader/assets/assets/images/image1485.png?v=64ca93834781cab9c45f6a059a1325c78d609cae5e23d3dd95e334e33ba11d2f)

<a id="element-01a18bf4-969e-7feb-aa71-2ab96407f3b6"></a>

Step 2: Configure User consent settings section

<a id="element-01a18bf4-969e-7988-845f-0d3bee315795"></a>

Under User consent settings, it may be necessary to select the following option: Allow user consent for apps from verified publishers, for selected permissions.

<a id="element-01a18bf4-969f-7b68-a4e2-6e7ea32f0d13"></a>

![Office 365: Under User consent settings, it may be necessary to select the following option: Allow user consent for apps from verified publishers, for selected permissions.](https://docs.mintsd.com/api/reader/assets/assets/images/image1486.png?v=ccd58e6b7675d0d9bf6b49f000a90c52cf3e0f91c1649b98f4e1b96e668aa0a6)

<a id="element-01a18bf4-96a0-7251-970e-b9e52974aebe"></a>

Step 3: Classify permissions

<a id="element-01a18bf4-96a1-7634-81aa-981002c85d4a"></a>

Under Permission classifications > Classify permissions, the administrator may need to classify the following permissions as Low:

<a id="element-01a18bf4-96a3-7bb9-9314-d2295f61a043"></a>

- offline_access
- IMAP.AccessAsUser.All
- SMTP.Send

<a id="element-01a18bf4-96a6-7bce-bfe0-863ee9d0314c"></a>

![Office 365: offline_access IMAP.AccessAsUser.All SMTP.Send](https://docs.mintsd.com/api/reader/assets/assets/images/image1487.png?v=d10c549c0339169cbff3acad51265cae9e3afa79c27c3cd4e0aca9d5cdd8f5ec)

<a id="element-01a18bf4-96a9-7d01-870e-4d1bb5d657c0"></a>

Please note, that the solution described above is provided as an example. The specific settings required may vary depending on your organization’s security policies and configuration.

