Microsoft Exchange Integration – PowerShell vs REST API

sndevastik
Tera Contributor

Hi Community,

I’m currently working on a Microsoft Exchange integration, where I’m creating a custom action/spoke to remove calendar events. I had a few questions regarding the OOTB (out-of-the-box) approach:

 

  1. Why does the OOTB Exchange integration use PowerShell to connect with Exchange Server instead of calling the REST API directly?

  2. What is the role of the MID Server in this integration?

  3. Why do we need to install additional modules (e.g., Exchange Online Management module – EXO) on the MID Server for establishing the connection?

Any insights would be appreciated to help me better understand the design choices and technical requirements.

 

Thanks in advance!

1 ACCEPTED SOLUTION

J Siva
Tera Sage

Hi @sndevastik 
First, it's important to understand your organization's Exchange infrastructure.
If your organization uses an Exchange On-Premises server, you must use the Microsoft Exchange Server Spoke for integration. REST APIs cannot be used directly with an on-premises Exchange server. That's why Exchange Server PowerShell cmdlets are used to manage mailbox/calendar related operations.

If your organization has a hybrid setup (Exchange On-Premises and Exchange Online) or only Exchange Online Application, you can use the Microsoft Exchange Online Spoke to communicate with your Exchange Online application via REST APIs.

What is the role of the MID Server in this integration?

ServiceNow application is cloud-hosted (outside your organization's network), while your Exchange server (On-Prem) is typically hosted within your organization's internal network or domain. To enable communication between ServiceNow and the on-prem Exchange server, you need to set up a MID Server within your organization's network. This MID Server acts as a bridge, allowing ServiceNow to execute remote PowerShell scripts on the Exchange server securely.

Hopw this helps.
Regards,
Siva

View solution in original post

1 REPLY 1

J Siva
Tera Sage

Hi @sndevastik 
First, it's important to understand your organization's Exchange infrastructure.
If your organization uses an Exchange On-Premises server, you must use the Microsoft Exchange Server Spoke for integration. REST APIs cannot be used directly with an on-premises Exchange server. That's why Exchange Server PowerShell cmdlets are used to manage mailbox/calendar related operations.

If your organization has a hybrid setup (Exchange On-Premises and Exchange Online) or only Exchange Online Application, you can use the Microsoft Exchange Online Spoke to communicate with your Exchange Online application via REST APIs.

What is the role of the MID Server in this integration?

ServiceNow application is cloud-hosted (outside your organization's network), while your Exchange server (On-Prem) is typically hosted within your organization's internal network or domain. To enable communication between ServiceNow and the on-prem Exchange server, you need to set up a MID Server within your organization's network. This MID Server acts as a bridge, allowing ServiceNow to execute remote PowerShell scripts on the Exchange server securely.

Hopw this helps.
Regards,
Siva