# OAuth for Outlook 365 ⛭

### Outlook 365 and OAuth, what you need to know

{% hint style="warning" %}
Read through this entire article before proceeding with any changes to your email settings.
{% endhint %}

Read through this entire process before proceeding

* Microsoft now mandates\* using OAuth 2.0 authentication.
* OAuth 2.0 for Outlook is implemented in Salesorder.

\*Microsoft removed the ability to use Basic authentication in Exchange Online for Exchange ActiveSync (EAS), POP, IMAP, Remote PowerShell, Exchange Web Services (EWS), Offline Address Book (OAB), Autodiscover, Outlook for Windows, and Outlook for Mac.&#x20;

### Existing 'Mail Account' Configurations

If you have existing 'Generic email accounts' in Salesorder, you'll need to delete them before you configure OAuth.&#x20;

Go to <mark style="color:orange;">Setup>Configuration>Email>Mail Accounts</mark> and delete the 'Generic Mail Accounts'

{% hint style="warning" %}
**To ensure continuity:**

Make a list of the accounts you are going to change/retain.

Note the user's email address details.
{% endhint %}

#### Want us to implement the changes for you?

If you don't feel comfortable doing these changes yourself, please let us know at <support@salesorder.com> and we'll get it done for you.

### Configure 365 Exchange Admin

You need to configure the Microsoft Exchange 'organization' settings for sending and receiving emails. We're specifically referring to the 'Mailflow' settings.

Go to your Exchange Admin Center at <https://admin.exchange.microsoft.com/>

Go to <mark style="color:orange;">Settings>Mail flow>Mail flow settings</mark> and uncheck "Turn off SMTP AUTH protocol for your organization.

Leave all other settings as is.&#x20;

<mark style="color:orange;">Save</mark> your changes.

#### Configure Salesorder Mail Account(s)

Go to <mark style="color:orange;">Setup>Configuration>Mail Accounts>Actions>New Microsoft 365 Account (Corporate)</mark>

Enter these details

| Field        |                                                                 |
| ------------ | --------------------------------------------------------------- |
| Account name | A memorable name                                                |
| Sender name  | Person sending (Worker)                                         |
| Sender email | Person's email address                                          |
| Use OAuth    | Check this box                                                  |
| Username     | Username for logging into Exchange. Probably the email address. |

<mark style="color:orange;">Save</mark> your changes.

### Accept Permissions Settings for Salesorder to access user Email.

Click the blue <mark style="color:orange;">Login</mark> button. You'll see this screen.

<figure><img src="https://lh4.googleusercontent.com/nO-43WmbP-TMJFXCncTs4q_T0nWI3JRpyHRwQWke4XsqhVonfq0c8Ib5qFPxL7pLF1ncTY4Xx7Xsa4AIn7yOaheAozE_WcCeJHU6L_-wRurXCOX7onSLTbJSBVIKrRB8DI1paEZnBo5ZuhBN4EN7UWOFoNXIQ3zjBP4CmN4waQlK8eLTYWA4UVaNN_7Mgg" alt=""><figcaption></figcaption></figure>

Enter your password and <mark style="color:orange;">Sign in</mark>. You'll see this screen.<br>

<figure><img src="https://lh3.googleusercontent.com/VjoKarH4OvWmBrFgSPu7XuFnOPpfIVQK-6DwOEi8k0n_CNcPjy5Pz9W-3r4a0iwg0lVSfmSbbQ1e5ZeWye2gwROaQjzZzJvCe4Euuc12yeZ_VDfVw8dBpe_p-_MXPOH9Yh1u-p8ZxF7kmp4ldIoUdHpEy3KSiBEh15obvy_bmkdyQ-rg18UtWyNA2eGYVw" alt=""><figcaption></figcaption></figure>

Click <mark style="color:orange;">Yes</mark> to accept these terms.&#x20;

Now click '<mark style="color:orange;">Test Connection</mark>'.

{% hint style="warning" %}
**If you encounter an issue**

Your 365 system administrator may need to intervene to accept the permissions request or enable 365 to allow the completion of this action by default.&#x20;

When the issue is resolved go back to the beginning of this process.

If you are still having problems, email <support@salesorder.com> and include the error message, i.e. Your error ID: ![](https://2650739216-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FnVmamp3TnQON29mRg6Hg%2Fuploads%2FgvSgzlclipcNnprSgfpO%2Fimage.png?alt=media\&token=59ee7efb-317b-434b-bce7-c52265d16b45), Subj: Outlook Setup.&#x20;
{% endhint %}

### Map the email folders

<mark style="color:orange;">Edit</mark> the Microsoft 365 Account (Corporate) settings page.

<mark style="color:orange;">Default Folder Mappings</mark> using the dropdowns select the folders you want to map.

<mark style="color:orange;">Save</mark> your changes.
