Skip to content

Commit b3300c8

Browse files
chore(backend): Introduce SAML connections per org (#4792)
Co-authored-by: Izaak Lauer <8404559+izaaklauer@users.noreply.github.com>
1 parent aeb5855 commit b3300c8

4 files changed

Lines changed: 12 additions & 0 deletions

File tree

.changeset/kind-crews-hear.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
'@clerk/backend': patch
3+
---
4+
5+
Allow to create and update SAML connections with organization IDs.
6+
7+
When users sign in or up using an organization's SAML connection, they're automatically added as members of that organization. For more information, refer to our docs: https://clerk.com/docs/organizations/manage-sso

packages/backend/src/api/endpoints/SamlConnectionApi.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ type CreateSamlConnectionParams = {
1414
name: string;
1515
provider: SamlIdpSlug;
1616
domain: string;
17+
organizationId?: string;
1718
idpEntityId?: string;
1819
idpSsoUrl?: string;
1920
idpCertificate?: string;
@@ -31,6 +32,7 @@ type UpdateSamlConnectionParams = {
3132
name?: string;
3233
provider?: SamlIdpSlug;
3334
domain?: string;
35+
organizationId?: string;
3436
idpEntityId?: string;
3537
idpSsoUrl?: string;
3638
idpCertificate?: string;

packages/backend/src/api/resources/JSON.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -360,6 +360,7 @@ export interface PaginatedResponseJSON {
360360
export interface SamlConnectionJSON extends ClerkResourceJSON {
361361
name: string;
362362
domain: string;
363+
organization_id: string | null;
363364
idp_entity_id: string;
364365
idp_sso_url: string;
365366
idp_certificate: string;

packages/backend/src/api/resources/SamlConnection.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ export class SamlConnection {
55
readonly id: string,
66
readonly name: string,
77
readonly domain: string,
8+
readonly organizationId: string | null,
89
readonly idpEntityId: string | null,
910
readonly idpSsoUrl: string | null,
1011
readonly idpCertificate: string | null,
@@ -28,6 +29,7 @@ export class SamlConnection {
2829
data.id,
2930
data.name,
3031
data.domain,
32+
data.organization_id,
3133
data.idp_entity_id,
3234
data.idp_sso_url,
3335
data.idp_certificate,

0 commit comments

Comments
 (0)