About Exchange (on-prem)
The Exchange (on-prem) integration connects Serval to an on-premises Microsoft Exchange server - Exchange 2016, Exchange 2019, or Exchange Subscription Edition - using remote PowerShell (PSRP over WinRM) against the server’s/PowerShell virtual directory (for example, https://mail.corp.example.com/PowerShell). It is a separate integration from Exchange Online, which targets Microsoft 365 tenants: connecting one does not grant the other.
Authentication: an approved Active Directory account (username and password) with Exchange management roles. The connection supports Kerberos, Negotiate, NTLM, and Basic authentication. Choose Kerberos for a /PowerShell virtual directory in Microsoft’s default configuration, which accepts Kerberos only; choose Negotiate or NTLM where your Exchange administrators have enabled NTLM on that directory, and Basic only over HTTPS. The Serval worker does not need to be domain-joined for Kerberos: it obtains tickets from your domain controllers with the account’s password.
Worker requirements: an on-prem Exchange server lives on your private network, so this integration requires a hybrid (self-hosted) Serval worker with network reach to the server. Serval’s cloud workers cannot reach a private-network target.
Data sync: On-demand only. There is no background sync, entity ingestion, or scheduled polling - each action opens a fresh remote PowerShell session against your server, runs, and disconnects.
Set up the account
Choose an approved account
Assign Exchange management roles
RemotePowerShellEnabled with Get-User -Identity "svc-serval" | Format-List RemotePowerShellEnabled.Verify remote PowerShell access
-Authentication Negotiate only when the connection will use Negotiate or NTLM: a Windows client’s Negotiate can pick Kerberos, so it does not prove that NTLM is enabled on the endpoint. Run the Serval connection healthchecks from the intended worker as well.Prepare for Kerberos authentication
Review these items with your directory and network teams before connecting with Kerberos. They apply in addition to the account setup above.- Network: TCP port 88 (or the port you give in the KDC list) from the Serval worker’s egress addresses to the domain controllers you list as KDCs, or to any the DNS SRV records return, and TCP 80 or 443 to the Exchange server named in the Server URI.
- Time: the worker nodes’ clocks within five minutes of the domain controllers, the Kerberos default tolerance.
- Account keys: AES encryption types enabled on the account (
msDS-SupportedEncryptionTypes), with a password set after AES was enabled. Windows updates from 2026 turn off RC4 for Kerberos ticket issuance by default. - Service principal: a Kerberos ticket names the host in the Server URI. An Exchange server’s own fully qualified name works by default, because its
HTTP/name maps to the computer account. A load-balanced name such asmail.corp.example.comneeds an alternate service account credential carryinghttp/mail.corp.example.com(Microsoft: “Configure Kerberos authentication for load-balanced Client Access services”); otherwise point the Server URI at one server’s fully qualified name. - Certificate for a per-server target over HTTPS: the server’s certificate must include the server’s own name. If it covers only the load-balanced name, use
http://with Kerberos message encryption (Microsoft’s documented form, TCP 80) instead of skipping certificate verification. - Extended Protection: Microsoft sets Extended Protection to Off on the front-end
/PowerShellvirtual directory. Serval sends channel bindings with its Kerberos tokens over HTTPS; if your administrators enabled Extended Protection there, a load balancer that terminates TLS with a different certificate than the server will make Kerberos fail.
Connect in Serval
Open the Exchange (on-prem) connect form
Enter the server and credentials
- Server URI (required) - the URL of your Exchange server’s PowerShell virtual directory, e.g.
https://mail.corp.example.com/PowerShell. Must be anhttp://orhttps://URL. With Kerberos,http://is acceptable because the session is encrypted with the Kerberos session key, the form Microsoft documents for remote Exchange PowerShell; Basic requireshttps://. Enter the final PowerShell URL: a Kerberos connection does not follow redirects. - Username (required) - the approved account, as
CORP\svc-servalorsvc-serval@corp.example.com. For Kerberos, the UPN form carries its own realm; theCORP\svc-servalform needs the Kerberos Realm field. - Password (required) - the account’s password.
Choose an Authentication Method
- Negotiate (NTLM) - the default; authenticates with NTLM, so NTLM must be enabled on the
/PowerShellvirtual directory. - NTLM - force NTLM explicitly.
- Basic (requires HTTPS) - sends credentials directly; Serval refuses Basic over plain
http://because the credentials would travel unencrypted. - Kerberos - authenticates with a Kerberos ticket obtained from your domain controllers with the account’s password. Choose it for a
/PowerShellvirtual directory in Microsoft’s default configuration. Selecting it shows two more fields, described in the next step.
Fill in the Kerberos fields (Kerberos only)
- Kerberos Realm - your Active Directory Kerberos realm in upper case, for example
CORP.EXAMPLE.COM. Required when the username isCORP\svc-servalorsvc-serval; optional forsvc-serval@corp.example.com, where it defaults to the upper-cased suffix. - Kerberos KDCs (Optional) - comma-separated domain controllers, each a host name or IPv4 address with an optional
:port(default 88), up to 16. Leave blank to discover them through DNS SRV records (_kerberos._tcp.corp.example.com), which requires the worker’s DNS resolver to serve your domain.
HTTP/ followed by the Server URI host, so the Server URI must name a host that holds that principal; an Exchange server’s own fully qualified name does by default. The endpoint must answer an unauthenticated request with a 401 Kerberos challenge; Serval refuses an endpoint that answers without challenging, because no Kerberos exchange would have taken place.Name the connection (optional)
REQUESTS_CA_BUNDLE in the worker environment while leaving verification on.Get-Recipient, Get-Mailbox, and Get-DistributionGroup with a one-item limit. The account needs these read cmdlets in its role assignments; the connection check does not require organization configuration permissions.
SecureString parameters
Commands such asNew-RemoteMailbox require a PowerShell SecureString for their password parameter. Use microsoft.powershell.exchangeOnPrem.secureString(value) as the parameter value in a structured pipeline. The runner negotiates a PSRP session key and encrypts this value in the protocol’s SecureString format.
The wrapper selects a wire type; it does not make workflow inputs secret or prevent them from being persisted. Do not put passwords directly in workflow source or assume this wrapper redacts them from workflow history. Use your approved workflow secret-handling mechanism. The password for a new AD user is separate from the credentials used to connect to Exchange.
Operation results
Typed actions fail when Exchange reports an error, including non-terminating PowerShell errors. The raw pipeline action returnserrors and hadErrors; check both before using its output. Runner output is limited to 32 MiB; narrow large queries or select fewer properties. A timeout or an error does not roll back changes already applied on the Exchange server. Check the current state before retrying a write.
getDistributionGroup reads group metadata without enumerating members. Use getDistributionGroupMembers when you need the membership list.
Group writes normally require the account to be listed in the group’s ManagedBy owners. For an approved non-owner administrator, set bypassSecurityGroupManagerCheck: true on the update, delete, add-member, or remove-member action. Exchange still requires the Security Group Creation and Membership role and the applicable recipient scope; this option does not bypass RBAC.
Group notes (including the description alias) are updated through Set-Group. When you also update mail settings, the helper issues separate commands; they are not atomic.
Gotchas and troubleshooting
403 Forbidden
403 Forbidden
403 to an unauthenticated request and never send a WWW-Authenticate challenge, so the connection fails before any credential is sent. With Kerberos, the error says which side of the Kerberos token the 403 fell on. “Before any Kerberos token was sent” means the endpoint never challenged: point the Server URI at an individual Exchange server that challenges, typically the server’s own fully qualified name, and ask your Exchange administrator which server names accept Kerberos for remote PowerShell. “After the Kerberos token was sent” means the endpoint refused the authenticated account: check remote PowerShell access and role membership.Kerberos errors and what to check
Kerberos errors and what to check
Connection refused or timeout
Connection refused or timeout
TLS certificate errors
TLS certificate errors
REQUESTS_CA_BUNDLE to its path, or enable Skip TLS certificate verification on the connection if you accept the weaker transport security. For a Kerberos connection to an individual server whose certificate names only the load-balanced address, prefer http:// with Kerberos message encryption over skipping verification.Arbitrary PowerShell script is rejected
Arbitrary PowerShell script is rejected
Exchange (on-prem) and Exchange Online are separate integrations
Exchange (on-prem) and Exchange Online are separate integrations
Need help? Contact support@serval.com for assistance with your Exchange (on-prem) integration.

