Skip to main content

RCRM email sync with Modern Auth - Office 365 configuration

What is needed for the Office 365 configuration.

T
Written by Terence Cassidy
Updated this week

Microsoft made changes in October 2022, meaning that everyone who uses the older more basic connectivity and setup loses that functionality unless you reset it up as per this guide.
​

πŸ“Œ ​Note: Most of the steps detailed below will need to be completed by your IT/eMail provider.


Office 365 configuration

To enable Email Sending and/or Exchange Email Sync task to access company email accounts using Modern (OAuth) Authentication, follow the steps below.
​
You need to follow these steps when you're setting up a new RCRM/O365 Tenant or when you're migrating an existing Tenant that used Basic Authentication. You can use the same App Registration for both Sending Emails and Exchange Sync. Therefore, if you've previously configured Exchange Sync, to enable Send Email, skip to the creating Permissions section in the steps.
​

πŸ“Œ ​Note: At the end of the configuration steps, you should have three values written down: an Application (client) ID, a Directory (tenant) ID and a Client secret value.


If you set up a new RCRM or O365 tenant or migrate an existing tenant used in Basic Authentication:

  1. Log into the Azure Portal with an administrator account.

  2. In Azure Active Directory, click View.

  3. Click App Registrations, then click + New Registration.

  4. For the name, enter RCRM, then select Accounts in any organizational directory (Any Azure AD directory – Multitenant).

  5. Click Register and make a note of the Application (client) ID and the Directory (tenant) ID.

  6. Click Manifest.

  7. Find the RequiredResourceAccess property. This looks like this:

    "requiredResourceAccess": [],

    or more likely the array within the square brackets will already contain some values and look like this

"requiredResourceAccess": [
{
"resourceAppId": "00000003-0000-0000-c000-000000000000",
"resourceAccess": [
{
"id": "e1fe6dd8-ba31-4d61-89e7-88639da4683d",
"type": "Scope"
}
]
}
],

  1. Add the following additional JSON text to the requiredResourceAccess array:

    { 
    "resourceAppId":"00000002-0000-0ff1-ce00-000000000000",
    "resourceAccess":[
    {
    "id":"dc890d15-9560-4a4c-9b7f-a736ec74ec40", "type":"Role"
    }
    ]
    }

  2. If the requiredResourceAccess array already contains a value, add the new JSON text above to what is already there, separated by a comma. Your final requiredResourceAccess property should look like this:
    ​

    "requiredResourceAccess": [
    {
    "resourceAppId": "00000002-0000-0ff1-ce00-000000000000",
    "resourceAccess": [
    {
    "id": "dc890d15-9560-4a4c-9b7f-a736ec74ec40",
    "type": "Role"
    }
    ]
    },
    {
    "resourceAppId": "00000003-0000-0000-c000-000000000000",
    "resourceAccess": [
    {
    "id": "e1fe6dd8-ba31-4d61-89e7-88639da4683d",
    "type": "Scope"
    }
    ]
    }
    ],
  3. Click Save.

  4. Click Certificates & Secrets.

  5. Click Client secrets, then click + New Client Secret.

  6. Enter an Exchange Sync description.

  7. Set the Expires value to 24 months. Click Add.

  8. Make a note of the expiry date and diarise this so you can make sure to create a new one and avoid disruption of email sending for your business.

  9. Write down the client secret value (not the Secret ID).

πŸ“Œ Note: If you don't write it down now, you won't be able to view this later and will have to delete the existing client secret and add a new one.

  1. Click API Permissions.

  2. Set the permissions as follows for each feature:
    ​

πŸ“Œ ​Note: If Exchange Sync was previously configured, just the Send Email permissions need to be added.

RCRM feature

Microsoft permission

Exchange Sync

If these permissions are missing:

  1. Click + Add Permission.

  2. Select the APIs my organization uses tab.

  3. Search for and select Office 365 Exchange Online.

  4. Select Application Permissions.

  5. Select full_access_as_app.

  6. Click Add permissions.

Send Email

  1. If these permissions are missing:

    1. Click + Add Permission.

    2. Select Microsoft Graph.

    3. Select Application Permissions.

    4. Find Mail.

    5. Select: Mail.ReadWrite and Mail.Send. (Make sure "Admin consent required" is "Yes")

    6. Click Add permissions.

  1. Click Grant admin consent for [your company name].

You should now have a note of three values: An Application (client) ID, a Directory (tenant) ID and a Client secret value.

You should also have a note of the secret expiry date to diarise when to renew it.

Did this answer your question?