Skip to content

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

Add email check for telemetry collection in SAML router

Akhil Mohan12da7bad9207
diff --git a/backend/src/ee/routes/v1/saml-router.ts b/backend/src/ee/routes/v1/saml-router.ts
index 757c4a0330..42351db27d 100644
--- a/backend/src/ee/routes/v1/saml-router.ts
+++ b/backend/src/ee/routes/v1/saml-router.ts
@@ -223,7 +223,7 @@ export const registerSamlRouter = async (server: FastifyZodProvider) => {
orgId: loginResult.orgId
});
} catch (error) {
- if (appCfg.OTEL_TELEMETRY_COLLECTION_ENABLED) {
+ if (appCfg.OTEL_TELEMETRY_COLLECTION_ENABLED && email) {
authAttemptCounter.add(1, {
"infisical.user.email": email.toLowerCase(),
"infisical.auth.method": AuthAttemptAuthMethod.SAML,