This PR addresses the long-standing request for Exchange 2019 support and fixes the “401 Unauthorized” / “Digital Envelope” errors that occur when using modern Node.js versions with on-premise Exchange servers.
Changes Made UI Support: Added Exchange 2019 to the version selection dropdown in the Exchange App setup (setup.tsx).
Type Definitions: Updated the ExchangeVersion enum to include Exchange2019 (Value 8) in enums.ts.
Backend Logic: Updated CalendarService.ts to handle the new 2019 version. Since Exchange 2019 is backward compatible, it now correctly falls back to the 2016 protocol logic rather than failing.
Crypto Fix: Added –openssl-legacy-provider to the Node options in package.json. This is required for Node 17+ (and specifically Node 25 used in development) to allow the legacy MD4/NTLM hashes used by many on-premise Exchange servers.
Locales: Added the English translation string for “Exchange 2019”.
Verification Verified that “Exchange 2019” appears in the UI.
Verified that the application no longer throws the “Unsupported Digital Envelope” error upon initializing the Exchange service on Node v25.
Fixes [CAL-1425] /claim #8123
Image 1: UI Implementation (setup.tsx) This screenshot shows the addition of “Exchange 2019” to the exchangeVersions array. This ensures that users can now select 2019 from the dropdown menu during the setup process.
Image 2: Connection Logic & Compatibility (CalendarService.ts) This screenshot shows the logic update in getExchangeService. It detects if a user selected 2019 and uses the 2016 protocol version as a fallback to ensure successful authentication while maintaining backward compatibility.
Run yarn dev on a machine using Node 17+.
Navigate to the App Store and select Exchange Calendar.
Observe that “Exchange 2019” is now an available option in the dropdown.
Attempt to configure an Exchange account; verify that the “Digital Envelope” crypto error no longer crashes the service initialization.
/claim #8123
lvwln
@lvwln
Cal.com, Inc.
@cal