Configure Connection
Microsoft Exchange Online guide
Install the Exchange Online PowerShell module, prepare app-only authentication, and configure and test the connection in NIM.
Before you startDirect link to Before you start
The connector uses the ExchangeOnlineManagement PowerShell module and certificate-based app-only authentication. Follow Microsoft's app-only authentication setup to prepare the Entra application, certificate, and permissions.
NIM requires Application ID, Organization, and Certificate. Organization must be the tenant's primary .onmicrosoft.com domain.
Install ExchangeOnlineManagementDirect link to Install ExchangeOnlineManagement
Run the following PowerShell script on the NIM server to install the required module if it is not already present:
if (!(Get-Module -ListAvailable -Name 'ExchangeOnlineManagement')) {
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
if (!(Get-PackageProvider -ListAvailable | Where-Object { $_.Name -eq 'NuGet' }) -or
(Get-PackageProvider -Name 'NuGet').Version -lt '2.8.5.201') {
Install-PackageProvider -Name 'NuGet' -MinimumVersion '2.8.5.201' -Force
}
Install-Module -Name 'ExchangeOnlineManagement' -Force -AllowClobber
}
Confirm that the installed module is available to the Windows account running the NIM service.
Configure the application and certificateDirect link to Configure the application and certificate
Follow the Microsoft setup linked above to:
- Register an application in Microsoft Entra ID and record its Application (client) ID.
- Grant Office 365 Exchange Online > Exchange.ManageAsApp as an application permission and grant administrator consent.
- Create a supported X.509 certificate and attach its public certificate to the application. Microsoft requires a CSP key provider rather than a CNG certificate for this authentication method.
- Assign the application the Exchange role permissions required by your process.
- Add the certificate with its private key to NIM.
Enter the connection settingsDirect link to Enter the connection settings
- In NIM Studio, open Systems > Overview and add a Microsoft Exchange Online system, or select the existing system.
- Open its Connection screen.
- Enter the following settings and save the connection.
| NIM setting | Value |
|---|---|
| Application ID | The Application (client) ID from the Entra application registration. |
| Organization | The tenant's primary .onmicrosoft.com domain, such as contoso.onmicrosoft.com. |
| Certificate | The certificate added to NIM for the application. Its public certificate must be attached to the Entra application. |
Test the Exchange connectionDirect link to Test the Exchange connection
- Select Test Connection. NIM attempts to connect to Exchange Online using a PSSession with the configured application, organization, and certificate.
- Confirm that the connection succeeds. If it fails, verify module availability, Application ID, Organization, certificate validity, administrator consent, and application permissions.
- Collect the system and inspect Mailboxes, DistributionGroup, DistributionGroupMembers, and MailboxPermissions, as needed for your process.
- Validate intended mailbox, group membership, and permission changes with safe test records before enabling scheduled automation or delegated App actions.
A successful connection does not confirm every operation is authorized. Validate each required collection and write operation separately.
For TLS connection errors, see the Exchange Online troubleshooting guidance.