Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

fix(saml): support Azure SAML 'Sign assertion only' configuration

Devin AIc402d79159a4
diff --git a/backend/src/ee/routes/v1/saml-router.ts b/backend/src/ee/routes/v1/saml-router.ts
index 00add4adc3..d0723799f5 100644
--- a/backend/src/ee/routes/v1/saml-router.ts
+++ b/backend/src/ee/routes/v1/saml-router.ts
@@ -83,6 +83,10 @@ export const registerSamlRouter = async (server: FastifyZodProvider) => {
}
if (ssoConfig.authProvider === SamlProviders.AZURE_SAML) {
samlConfig.disableRequestedAuthnContext = true;
+ // Azure AD/Entra ID can be configured to sign only the assertion (not the response).
+ // Setting wantAuthnResponseSigned to false allows both "Sign SAML assertion" and
+ // "Sign SAML response and assertion" configurations to work.
+ samlConfig.wantAuthnResponseSigned = false;
if (req.body?.RelayState && JSON.parse(req.body.RelayState).spInitiated) {
samlConfig.audience = `spn:${ssoConfig.issuer}`;
}