Create azure app for outlook integration

Create an Azure AD (Azure Active Directory) application and service principal that can access resources


1. Register an application with Azure AD and create a service principal

  1. Sign in to your Azure Account through the Azure portal.
  2. Select Azure Active Directory.
  3. Select App registrations.
  4. Select New registration.
  5. Name the application (eg; CPP). Select a supported account type, which determines who can use the application (Select Option 3).Under Redirect URI, select Web for the type of application you want to create. Enter the URI where the access token is sent to. You can't create credentials for a Native application. You can't use that type for an automated application. After setting the values, select Register.
  6. After click on registartion, Generate Application (client) ID as below:

2. Create a new application secret

  1. Select Azure Active Directory.
  2. From App registrations in Azure AD, select your application.
  3. Select Certificates & secrets.
  4. Select Client secrets -> New client secret.
  5. Provide a description of the secret, and a duration. When done, select Add.
  6. After saving the client secret, the value of the client secret is displayed. Copy this value because you won't be able to retrieve the key later. You will provide the key value with the application ID to sign in as the application. Store the key value where your application can retrieve it or save OUTLOOK CLIENT ID, OUTLOOK CLIENT SECRET and OUTLOOK REDIRECT URL values into System Settings Panel.

3. How to change outlook configuration into Cool Life CRM

  1. Go to admin menu > select system settings > outlook configuration section > change Outlook Client Id, Outlook Client Secret and Outlook Redirect URL values > press save settings button.
    Note: Cool Life CRM administrator account only changes outlook configuration.

4. Grant the Azure App the Required API Permissions

  1. In the left panel, select Azure Active Directory.
  2. Select App registrations.
  3. From the App registrations panel, select your App created in the previous section.
  4. Click API permissions and Add a permission.
  5. In the Request API permissions panel, select the Microsoft Graph tile.
  6. In the Request API permissions panel, click the Application permissions tile.
  7. In the Request API permissions panel. Click on all checkbox of the User , APIConnectors ,Application, Calenders, Mail as below;

5. Error and Solution

  1. At the time of login with outlook,may be facing this error:
    Error: https://graph.microsoft.com/v1.0/me API is not provide mail address
  2. The following steps need to be taken to resolve this error:
    • It's been set on on-premises AD, and then synchronized to Azure AD using AD Connect
    • The cloud user has been assigned an Office 365 license (and a mailbox), at which point the mail property is set for this licensed user.
    • It means the user does not have the mail property. The mail is read-only which is the SMTP address for the user. It is tied to Exchange Online, you could not write to that attribute unless you have an Exchange Online license, when you activate a license for the user, Exchange Online will update the field with the correct mailbox mail address during the creation of the user's mailbox.