Skip to content

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

chore: improve org auth enforced message

Sheen Capadngan250ea0740d7f
diff --git a/backend/src/ee/services/permission/permission-fns.ts b/backend/src/ee/services/permission/permission-fns.ts
index a2c19a0537..156ab1f96d 100644
--- a/backend/src/ee/services/permission/permission-fns.ts
+++ b/backend/src/ee/services/permission/permission-fns.ts
@@ -219,7 +219,9 @@ function validateOrgSSO(
// case: google sso is enforced, but the actor is not using google sso
if (isOrgGoogleSsoEnforced && actorAuthMethod !== null && actorAuthMethod !== AuthMethod.GOOGLE) {
- throw new ForbiddenRequestError({ name: "Org auth enforced. Cannot access org-scoped resource" });
+ throw new ForbiddenRequestError({
+ name: "Org auth enforced. Cannot access org-scoped resource. Login with Google SSO to access this resource."
+ });
}
// case: SAML SSO is enforced, but the actor is not using SAML SSO
@@ -229,7 +231,9 @@ function validateOrgSSO(
!isAuthMethodSaml(actorAuthMethod) &&
actorAuthMethod !== AuthMethod.OIDC
) {
- throw new ForbiddenRequestError({ name: "Org auth enforced. Cannot access org-scoped resource" });
+ throw new ForbiddenRequestError({
+ name: "Org auth enforced. Cannot access org-scoped resource. Login with SAML SSO to access this resource."
+ });
}
}