Skip to content

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

checkpoint

Daniel Hougaardc2947032a34f
diff --git a/backend/src/services/secret-sync/azure-entra-id-scim/azure-entra-id-scim-sync-fns.ts b/backend/src/services/secret-sync/azure-entra-id-scim/azure-entra-id-scim-sync-fns.ts
index 2bb61e0399..8b5d6e546c 100644
--- a/backend/src/services/secret-sync/azure-entra-id-scim/azure-entra-id-scim-sync-fns.ts
+++ b/backend/src/services/secret-sync/azure-entra-id-scim/azure-entra-id-scim-sync-fns.ts
@@ -82,7 +82,7 @@ export const azureEntraIdScimPreSaveTransformSyncOptions: TPreSaveTransformSyncO
return { ...rest, secretId: secret.id };
}
- // If no new secretKey provided but there's an existing secretId, validate it still exists in the (possibly new) folder
+ // If no new secretKey provided, preserve the existing secretId and validate it still exists in the (possibly new) folder
const existingSecretId = existingSyncOptions?.secretId as string | undefined;
if (existingSecretId) {
const secret = await secretV2BridgeDAL.findOne({ id: existingSecretId, folderId });
@@ -92,6 +92,7 @@ export const azureEntraIdScimPreSaveTransformSyncOptions: TPreSaveTransformSyncO
"The previously configured secret no longer exists in the source folder. Please re-specify syncOptions.secretKey."
});
}
+ return { ...syncOptions, secretId: existingSecretId };
}
return syncOptions;
diff --git a/backend/src/services/secret-sync/azure-entra-id-scim/azure-entra-id-scim-sync-schemas.ts b/backend/src/services/secret-sync/azure-entra-id-scim/azure-entra-id-scim-sync-schemas.ts
index 13d1b2026b..778df7ee39 100644
--- a/backend/src/services/secret-sync/azure-entra-id-scim/azure-entra-id-scim-sync-schemas.ts
+++ b/backend/src/services/secret-sync/azure-entra-id-scim/azure-entra-id-scim-sync-schemas.ts
@@ -35,6 +35,7 @@ const AzureEntraIdScimSyncOptionsReadSchema = z.object({
secretId: z
.string()
.uuid()
+ .optional()
.describe("The ID of the Infisical secret whose value will be used as the SCIM provisioning token.")
});
@@ -68,7 +69,7 @@ export const CreateAzureEntraIdScimSyncSchema = GenericCreateSecretSyncFieldsSch
export const UpdateAzureEntraIdScimSyncSchema = GenericUpdateSecretSyncFieldsSchema(
SecretSync.AzureEntraIdScim,
AzureEntraIdScimSyncOptionsConfig,
- AzureEntraIdScimSyncOptionsInputSchema
+ AzureEntraIdScimSyncOptionsInputSchema.partial()
).extend({
destinationConfig: AzureEntraIdScimSyncDestinationConfigSchema.optional()
});