Skip to content

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

Feat: Org Scoped JWT Tokens

Daniel Hougaard4a0668e92e3c
diff --git a/backend/src/ee/services/scim/scim-service.ts b/backend/src/ee/services/scim/scim-service.ts
index c542b23401..1ca881ed02 100644
--- a/backend/src/ee/services/scim/scim-service.ts
+++ b/backend/src/ee/services/scim/scim-service.ts
@@ -429,6 +429,15 @@ export const scimServiceFactory = ({
});
}
+ const organization = await orgDAL.findById(scimToken.orgId);
+
+ if (!organization.scimEnabled) {
+ throw new ScimRequestError({
+ detail: "SCIM is disabled for the organization",
+ status: 403
+ });
+ }
+
return { scimTokenId: scimToken.id, orgId: scimToken.orgId };
};