Integrate Sage CRM with Microsoft Office 365 Part using OAuth2.0

By | April 19, 2023

In today’s world every work done is paperless. For e.g. in many of the big organizations, everything is documented and communicated over emails. This reduces the exchanges of letters being used for the communication. Emails can be sent to the clients, vendors for any enquiries or information needed. Sage CRM also have an Email Integration which enables us to send emails to clients using CRM. For this, we just need to enter the Email configuration in CRM and then we can send emails. Also, we can download the emails sent by client in CRM using Sage CRM’s Email Inbound functionality.

New Stuff: Sage CRM: Troubleshooting New E-mail issue

In Sage CRM, we used to add Basic Authentication for integrating Microsoft Office 365 with Sage CRM. You can refer below blog link for the same.

Related Post: Integrate Sage CRM with Microsoft Office 365 Part-1/

But, from the release of Sage CRM 2020 R2, access to Basic Authentication is stopped and they have added new OAuth 2.0 Authentication. When application logs on using Basic authentication, it uses our credentials and it will have all owner rights. Whereas in OAuth 2.0, token is generated for the application and it will not have owner rights. And it will only behave as per the access defined for the application.

In Basic authentication, we used to provide the user credentials to connect to the Exchange server which is explained in above blog link. Whereas, in OAuth 2.0 we have to provide the token. So, first we have to obtain OAuth 2.0 client ID. To get the same, we have to follow the below steps.

  1. Sign in into Outlook Web App using following URL.
  2. In Outlook setting, go to POP and IMAP and make sure that Let devices and apps use POP is set to Yes.

Follow the below steps to get the OAuth 2.0 client ID.

  1. Sign in to the Azure Active Directory Admin center as an administrator.
  2. Go to App Registrations.
  3. Register a New Application by following below steps.
    • Click New Registration.
    • Enter the Name of the Application.
    • In Supported account types, select Accounts in any organizational directory (Any Azure AD directory – Multitenant) and personal Microsoft accounts (e.g. Skype, Xbox) option.
    • Under Redirect URI, select Web and enter the following URIs:
    • http://localhost/<install name>/custompages/oauth/callback.html
    • https://<server name>/<install name>/custompages/oauth/callback.html
    • Click on Register.
    • After registering the application, you will get the Application Id (Client Id). Copy the same and store it somewhere, because we have to add it in CRM.

Now, to add the Client Id in CRM, follow below steps.

  1. Login into Sage CRM.
  2. Go to Administration → E-mail and Documents → Exchange Server Integration → Connection Management.
  3. Enter the Client key obtained in above steps in “Application (Client) ID” field.
  4. Select the “Exchange Type” as “Exchange Online (Office 365)”.
  5. Set “OAuth Authority” as “”.

Please refer below screenshot for your reference.

Exchange Integration OAuth

In this way, you can Integrate Sage CRM with Microsoft Office 365 using OAuth 2.0.

About Us

Greytrix – a globally recognized and one of the oldest Sage Development Partners is a one-stop solution provider for Sage ERP and Sage CRM organizational needs. Being acknowledged and rewarded for multi-man years of experience and expertise, we bring complete end-to-end assistance for your technical consultations, product customizations, data migration, system integrations, third-party add-on development, and implementation competence.

Greytrix has some unique integration solutions developed for Sage CRM with Sage ERPs namely Sage X3Sage IntacctSage 100Sage 500, and Sage 300. We also offer best-in-class Sage ERP and Sage CRM customization and development services to Business Partners, End Users, and Sage PSG worldwide. Greytrix helps in the migration of Sage CRM from Salesforce | ACT! | SalesLogix | Goldmine | Sugar CRM | Maximizer. Our Sage CRM Product Suite includes addons like  Greytrix Business ManagerSage CRM Project ManagerSage CRM Resource PlannerSage CRM Contract ManagerSage CRM Event ManagerSage CRM Budget PlannerGmail IntegrationSage CRM Mobile Service SignatureSage CRM CTI Framework.

Greytrix is a recognized Sage Champion Partner for GUMU™ Sage X3 – Sage CRM integration listed on Sage Marketplace and Sage CRM – Sage Intacct integration listed on Sage Intacct Marketplace. The GUMU™ Cloud framework by Greytrix forms the backbone of cloud integrations that are managed in real-time for the processing and execution of application programs at the click of a button.

For more information on our integration solutions, please contact us at We will be glad to assist you.