Kloudless Blog

Kloudless Unified APIs enable you to code once and integrate many

This article is a part of our “Getting Started” series, with featured articles on getting started with API integrations to Dropbox, Google Calendar, Gmail, Salesforce, and MS Teams.


Microsoft’s Exchange is the most popular enterprise email service available today. With the recent release of the Kloudless Unified Email API, we thought it would be helpful to provide a straightforward walkthrough of how to integrate your application with the powerful email provider. Getting started with the Exchange API is a bit more tricky than some other email providers’ APIs, like Gmail, so let’s walk through getting set up to integrate the powerful enterprise email client into your application.

Setting up Exchange Server

Unlike many of our other APIs, Microsoft Exchange Server requires some additional setup. The first thing is to verify which version of Exchange Server you need to support.

You can view the following Exchange Server versions from Microsoft:

  • Exchange Server 2019
  • Exchange Server 2016
  • Exchange Server 2013
  • Exchange Server 2010

For the rest of this article, we’ll assume you’ll want to connect with the latest version of Exchange Server 2019.

Once you’ve downloaded the server, you first need to install and configure your Exchange Server.

Exchange Web Services

Once Exchange Server 2019 is installed and configured, we need to make sure the server is accessible for API requests.

We’ve detailed a few of the steps in our previous post, but as a quick summary:

  1. Configure the related firewall settings to allow access.
  2. Provide a Digital Server Certificate as described here.
  3. Ensure an external URL is present, under the Exchange Admin Center > servers > virtual directories > EWS menu option. Note that the external URL needs to end with /EWS/Exchange.asmx. See here for details.

Application Setup

Microsoft developer services are tied to the Azure Portal, so you should be able to login with either your work or personal email; otherwise, sign up here.

Navigate to Azure Active Directory, and under manage, select App registrations. Then click New registration:

Fill out the required information describing your application. We recommend choosing Accounts in any organizational directory for supported account types, but not personal Skype or Xbox accounts.

Select API permissions in the left-hand navigation under Manage. Select Add a permission. On the Request API permissions page, select Exchange under Supported legacy APIs.

To use Delegated permissions, select Delegated permissions and then select EWS.AccessAsUser.All under EWS. Click on Add permissions.

Making your first Exchange API request

Your code to make your first request to the Exchange API can be set up like so:

Make sure to include your APP_ID and CLIENT_SECRET, and you should be good to go. For more information, please consult the official Exchange docs here.

Kloudless is the best way to Integrate Exchange

Integrating with Exchange can take as much as 6 months of development time, and that’s not taking into account the ongoing maintenance and support to keep that connection sound in the future. 

The Kloudless Unified Email API was built to connect your application with Gmail, Microsoft Outlook, Office 365, and on-prem Exchange Server in minutes. With Kloudless, you can send, receive, and access emails from any service with real-time bi-directional sync. The Kloudless Unified Email API provides a single, common set of API endpoints and data models to send emails and retrieve email content including email attachments. Kloudless also offers extensive activity monitoring and webhooks to all of our connectors, as well as support for all major event bus services.

Kloudless also takes away the headache of maintenance and API updates, so your development team can focus on what’s important: Your app’s core functionality.

Using Kloudless with Exchange

You can sign up today for a free developer account with Kloudless and get started with integrating to Exchange or any of the other connectors provided in the Unified Email API. 

Once signed in, you will find the Callback URL or redirect URI under THIRD-PARTY SERVICES => Configuration. Please click the SaaS product Exchange and select “Use Your Exchange Keys.”

After filling in the Client ID and Client Secret, you will also need to set a specific Callback URL or Redirect URI from the Microsoft Developer portal. Click Save and you’re all set.

To learn more about the Kloudless Unified Email API, please visit our product page or direct any inquiries to hello@kloudless.com.

Categories:

Share this article:

Let’s get started. Start building for free today.