1. AskCody Help Center
  2. Implementing AskCody
  3. 4. Integrate with Microsoft Exchange

Integrating Microsoft Exchange with AskCody

Configuring the AskCody integration with Microsoft Exchange is a key step and a requirement for your AskCody Platform to work since AskCody is built on top of Microsoft Exchange.

Note

We recommend that the following steps of integrating AskCody with Microsoft Exchange are performed and done by an Exchange Admin or an External Microsoft Exchange Professional who is familiar with configuring Microsoft Exchange and must have the Microsoft Exchange Admin Role in your organization.
If you don’t have this access or role, please contact your IT department, and explain the requirements of setting up AskCody.


Therefore, this step is key to setting up your AskCody platform. 

All settings in Microsoft Exchange can be managed both inside the Exchange Admin Center or using PowerShell. Using PowerShell, you can create, manage, and edit multiple meeting rooms at once. AskCody integrates with Microsoft Exchange via Exchange Webservices Managed API and integrates with and shares data using Microsoft EWS – a native part of Microsoft Exchange and Microsoft Exchange Online to share data with third parties like AskCody.

Integrating with Microsoft Exchange data is done using one of two authentication methods depending on Exchange Server or Exchange Online. These are referred to as Modern- and Basic Authentication. It’s up to you, or your organization’s security policies to decide which method you want to use based on your version of Microsoft Exchange. 

Modern and Basic Authentication

Modern Authentication
With Modern Authentication, a Global Administrator in your organization grants permissions to the AskCody EWS application through an OAuth 2.0 flow in Azure Active Directory. The AskCody EWS application can then access EWS using a certificate-based authentication flow. This means that no Service Account and no credentials are shared with AskCody when integrating AskCody with Exchange.

Modern Authentication can only be used with Exchange Online and Office 365.

Basic Authentication
Basic Authentication requires that you integrate using a username and password of an Exchange Service Account when integrating AskCody with Exchange. These credentials are then used to integrate with Exchange Web Services (EWS) to access data in Microsoft Exchange. With an integration to Exchange Server using a Service Account, you administer the credentials to this account and is responsible for entering these into the AskCody Management Portal when integrating Microsoft Exchange with AskCody.

Credentials are subsequently end-to-end hashed and encrypted, so they never appear in plain text, when entered in the AskCody platform. The credentials are hashed and encrypted both at rest and at motion. The Service Account (email and password) entered in the AskCody Management can thus be used solely by the AskCody platform to log in via EWS to access the meeting data listed above on the meeting room resources integrated with the platform.

If you are not familiar with how to create a Service Account and provision this role with the right permissions, please read and follow this guide on how to create a Service Account in Microsoft Exchange.

Read more about the differences between Modern and Basic Authentication in this article.

Integrate Microsoft Exchange with AskCody

Based on your version of Exchange, now choose one of the two methods to integrate and follow step-by-step:

Modern Authentication

Integrating with AskCody with Modern Auth (OAuth 2.0)

Exchange Admin

In order to integrate with Exchange Online using Modern Authentication, you must be a Global Administrator in your organization's Azure Active Directory.
Using Modern Authentication, it is required that the Global Admin account used for authentication (a role assigned in Active Directory) has a mailbox assigned and connected to the account, since verifying that a mailbox exists for the user (the email address) is part of the validation and verification process. This ensures that integration between the Exchange mailboxes and AskCody can be established. Learn more about this here

  1. Log in to the AskCody Management Portal with the credentials created when creating your organizational account on the signup page
  2. Click on the Admin Center at the left panel
  3. In here, click Integrations and choose MS Exchange Integrations.
  4. Click Add and choose Microsoft Exchange Online (Office 365).
  5. Click Integrate and you will be redirected to the Microsoft Portal and asked to log in.

A screenshot of the AskCody Management Portal's page to establish an integration with Microsoft Exchange Online via Modern Authentication (OAuth 2.0)

7.  Click Accept to the permission request, and if you don't get an error your integration is correct and is now established.

 Permissions requested by the AskCody App in EWS

Using Modern Authentication to Support various scenarios

Following the news that Microsoft would soon deprecate Basic Authentication for Exchange Online integrations, we decided to improve the ways a customer can integrate with AskCody, using Modern Authentication, and all of the following setups are now fully supported. 

  • Having multiple Modern Authentication integrations between a single Microsoft Exchange tenant and a single AskCody Management Portal. 
  • Create integrations with Modern Authentication from multiple Microsoft Exchange tenants to a single AskCody Management Portal.
  • Create an integration from a single Microsoft Exchange tenant to multiple AskCody Management Portals.

Basic Authentication

Using Basic Authentication to integrate Microsoft Exchange and AskCody, you need to create an Exchange User (also called a Service Account) and give this user the ApplicationImpersonation role. This is a requirement for AskCody to work. ApplicationImpersonation must be enabled on the Service Account. You can learn more about why in this article that describes the difference between ApplicationImpersonation and Delegated Access and why ApplicationImpersonation is required for using Basic Auth using a Service Account.

  1. Create a Service Account in your Exchange environment. See how here.
    We recommend that you call this user "askcody@your-domain.com" or similar.
  2. Log in to the AskCody Management Portal with the credentials created when creating your organizational account on the signup page
  3. Click on the Admin Center at the left panel
  4. In here, click Integrations and choose MS Exchange Integrations.
  5. Click Add and choose Microsoft Exchange Server.
  6. Now, enter the information required
  7. The email address should be the one you just created as an Exchange User "askcody@your-domain.com". The password is the password you created for this user creating the Service Account.
  8. Choose your version of Exchange and type in your EWS URL.
  9. Clicking Integrate will validate that all the fields are correct and establish the integration of Microsoft Exchange with AskCody. If you don't get an error message your Microsoft Exchange Integration is enabled and ready. If you do get an error message, please read below.
 A screenshot of the Management Portal's page to establish an integration between AskCody and Microsoft Exchange via Exchange Web Services (EWS)

How to test if the integration is set up correctly

No matter if you used the Modern or Basic Authentication method to create the integration between your Exchange and the AskCody Management Platform, you ended up clicking the Integrate button. 

After clicking on the green Integrate button, the system will attempt to establish the integration using the credentials you provided. If you do not get an error message your integration is enabled and ready, and you don't need to test if the integration is set up correctly.
Otherwise, you will see an error code such as
ErrorUnauthorized. Most of the times, an error in this section of the AskCody Management Portal is related either to the credentials (username and password) for the account being incorrectly typed in, the Exchange version selected does not match the Exchange version of the server in which the account is located, or the EWS URL is typed in incorrectly. In the troubleshooting section of our Help Center, we have dedicated a section for Error codes. Here, you will find explanations for the different errors in the platform and viable solutions to them.  

 

Next step: Adding Microsoft Exchange Calendars to the AskCody Platform