|
Fully Self-hosted
MFA for Dynamics 365 On-Premises and AD FSStrengthening on-premises CRM security without introducing an external MFA cloud dependency. Many organizations continue to operate business-critical deployments of Microsoft Dynamics CRM or Dynamics 365 Customer Engagement on-premises. These environments typically rely on on-premises Active Directory Federation Services, claims-based authentication, and Internet-Facing Deployment (IFD) to provide secure access for internal and remote users. Microsoft supports AD FS as the security token service for Dynamics 365 Customer Engagement on-premises. Dynamics 365 can use claims-based authentication for internal access and IFD for external access, with AD FS issuing the security tokens consumed by CRM. However, organizations that want to add modern multifactor authentication to this architecture face a difficult choice. Many MFA products are designed primarily for cloud services, rely on an external authentication platform, or provide only a general AD FS integration without addressing the operational requirements of Dynamics CRM on-premises. MachSol has addressed this long-awaited requirement by developing a fully self-hosted multifactor authentication solution for Dynamics CRM and Dynamics 365 Customer Engagement on-premises through on-premises AD FS.
The exact scenario we addressedThe solution was designed for the following architecture: Dynamics CRM or Dynamics 365 CE On-Premises
▼
Claims-Based Authentication or IFD
▼
Active Directory Federation Services On-Premises
▼
MachSol MFA Adapter
▼
Customer-Controlled SQL Server and Encryption
This is an important distinction. Generic AD FS MFA products can potentially protect browser-based relying parties. MachSol’s implementation is focused specifically on environments where Dynamics CRM, AD FS, MFA processing, authenticator records, recovery state, and encryption controls must all remain on-premises. How the solution worksThe MachSol MFA Adapter integrates with the external authentication-provider framework in AD FS. Microsoft supports custom external authentication providers and documents the interfaces required to participate in the AD FS authentication pipeline. The user journey
The enrollment and verification experience is embedded directly into the AD FS authentication journey. No separate cloud enrollment portal is required. Production capabilities
SQL-backed authentication stateSQL Server maintains:
TOTP replay protectionA mathematically valid code should not automatically be accepted more than once. The adapter records the last accepted TOTP counter and uses an atomic SQL update to require: New counter > Last accepted counter
This helps prevent the same authenticator code from being reused within its validity period and supports consistent behavior across multiple AD FS nodes. Failed-attempt controls and lockoutThe solution tracks unsuccessful verification attempts within a configured time window. When the configured threshold is reached, the MFA record can be temporarily locked to reduce repeated guessing attempts. Secure email-assisted recoveryAn enrolled user who can no longer use the registered authenticator can request a temporary, single-use recovery code through the email address associated with the account. The recovery design includes:
Email recovery is used to authorize authenticator replacement. It is not intended to become a permanent alternative to normal authenticator verification. Authenticator replacementAfter a recovery code is successfully verified, the user enters a controlled replacement workflow: Recovery verified
▼
Account enters replacement-pending state
▼
New authenticator secret is generated
▼
New QR code is displayed
▼
User verifies a code from the new authenticator
▼
New secret becomes active — previous authenticator replaced
The new authenticator is not activated merely because the QR code was displayed. Activation occurs only after a valid code from the pending authenticator is confirmed. Notification queue and retention controlsRecovery messages are processed using a database-backed notification queue and an approved SQL Server Database Mail profile. The hardened processing design includes:
Operational loggingThe adapter writes operational and security events to the Windows Application event log. Correlation IDs allow administrators to connect the user-facing support reference, AD FS activity, adapter events, recovery processing, and authentication success or failure. Sensitive authenticator secrets and recovery codes are not intended to be written to the audit log. Controlled MFA exemptions for CRM integrationsNot every Dynamics CRM connection is an interactive browser session. CRM environments may include:
Some non-interactive processes cannot respond to a QR enrollment page or enter a one-time authenticator code. Dynamics 365 Customer Engagement on-premises supports several authentication models and client patterns, so each integration must be evaluated according to the protocol and client behavior it uses. MachSol’s solution includes the ability to support controlled, policy-based MFA exemptions for specifically approved users and integration scenarios. An exemption is not intended to disable MFA generally. Exemptions should be: ● Explicitly authorized ● Narrowly scoped ● Documented and auditable ● Regularly reviewed ● Restricted to the required relying party or integration scenario Normal interactive CRM users continue to be protected by MFA. Why this mattersMany organizations cannot move every identity, application, or security process to a public cloud platform. Common requirements include:
The key achievement is not simply generating a six-digit code. It is integrating enrollment, TOTP verification, replay protection, recovery, authenticator replacement, encryption, SQL concurrency, auditing, controlled exemptions, and an AD FS-compatible user experience into an existing Dynamics CRM on-premises authentication environment. More than a CRM-only technical componentThe core technology is implemented as an AD FS external authentication provider. Architecturally, it can be evaluated for other compatible browser-based AD FS relying parties. Potential future application profiles may include:
Each application still requires protocol, claims, client, service-account, and integration testing. The initial product focus remains Dynamics CRM and Dynamics 365 Customer Engagement on-premises, because that is the environment for which the solution was specifically developed and production deployed. A specialized on-premises security capabilityMachSol has now developed a purpose-built MFA capability for this exact scenario: Dynamics CRM On-Premises
+
AD FS On-Premises
+
MFA Processing On-Premises
+
Inline Authenticator Enrollment
+
Customer-Controlled SQL Storage
+
Customer-Controlled Encryption
+
Secure Recovery and Replacement
+
No External MFA Cloud Dependency
Publicly available vendor documentation shows several generic AD FS MFA options, but the market appears to have limited purpose-built offerings that combine this complete Dynamics CRM on-premises operating model with local MFA processing and CRM-focused deployment support. For Dynamics CRM customers, hosting providers, and regulated organizations, this represents an opportunity to strengthen authentication without abandoning the existing on-premises platform or surrendering control of sensitive authentication data. Next stepsMachSol is continuing to mature the solution through:
Talk to MachSol about self-hosted MFAOrganizations operating Dynamics CRM or Dynamics 365 Customer Engagement on-premises can contact MachSol to discuss requirements for AD FS-integrated, fully self-hosted multifactor authentication.
|
