@@ -63,6 +63,7 @@ def create(
6363 issuer_url : str ,
6464 organization_id : str ,
6565 additional_scopes : SequenceNotStr [str ] | Omit = omit ,
66+ claims_expression : Optional [str ] | Omit = omit ,
6667 display_name : str | Omit = omit ,
6768 email_domain : Optional [str ] | Omit = omit ,
6869 email_domains : SequenceNotStr [str ] | Omit = omit ,
@@ -120,6 +121,11 @@ def create(
120121 during sign-in. These are appended to the default scopes (openid, email,
121122 profile).
122123
124+ claims_expression: claims_expression is an optional CEL expression evaluated against OIDC token
125+ claims during login. When set, the expression must evaluate to true for the
126+ login to succeed. Example:
127+ `claims.email_verified && claims.email.endsWith("@example.com")`
128+
123129 email_domain: email_domain is the domain that is allowed to sign in to the organization
124130
125131 extra_headers: Send extra headers
@@ -139,6 +145,7 @@ def create(
139145 "issuer_url" : issuer_url ,
140146 "organization_id" : organization_id ,
141147 "additional_scopes" : additional_scopes ,
148+ "claims_expression" : claims_expression ,
142149 "display_name" : display_name ,
143150 "email_domain" : email_domain ,
144151 "email_domains" : email_domains ,
@@ -210,6 +217,7 @@ def update(
210217 sso_configuration_id : str ,
211218 additional_scopes : Optional [AdditionalScopesUpdateParam ] | Omit = omit ,
212219 claims : Dict [str , str ] | Omit = omit ,
220+ claims_expression : Optional [str ] | Omit = omit ,
213221 client_id : Optional [str ] | Omit = omit ,
214222 client_secret : Optional [str ] | Omit = omit ,
215223 display_name : Optional [str ] | Omit = omit ,
@@ -265,6 +273,10 @@ def update(
265273
266274 claims: claims are key/value pairs that defines a mapping of claims issued by the IdP.
267275
276+ claims_expression: claims_expression is a CEL expression evaluated against OIDC token claims during
277+ login. When set, the expression must evaluate to true for the login to succeed.
278+ When present with an empty string, the expression is cleared.
279+
268280 client_id: client_id is the client ID of the SSO provider
269281
270282 client_secret: client_secret is the client secret of the SSO provider
@@ -288,6 +300,7 @@ def update(
288300 "sso_configuration_id" : sso_configuration_id ,
289301 "additional_scopes" : additional_scopes ,
290302 "claims" : claims ,
303+ "claims_expression" : claims_expression ,
291304 "client_id" : client_id ,
292305 "client_secret" : client_secret ,
293306 "display_name" : display_name ,
@@ -469,6 +482,7 @@ async def create(
469482 issuer_url : str ,
470483 organization_id : str ,
471484 additional_scopes : SequenceNotStr [str ] | Omit = omit ,
485+ claims_expression : Optional [str ] | Omit = omit ,
472486 display_name : str | Omit = omit ,
473487 email_domain : Optional [str ] | Omit = omit ,
474488 email_domains : SequenceNotStr [str ] | Omit = omit ,
@@ -526,6 +540,11 @@ async def create(
526540 during sign-in. These are appended to the default scopes (openid, email,
527541 profile).
528542
543+ claims_expression: claims_expression is an optional CEL expression evaluated against OIDC token
544+ claims during login. When set, the expression must evaluate to true for the
545+ login to succeed. Example:
546+ `claims.email_verified && claims.email.endsWith("@example.com")`
547+
529548 email_domain: email_domain is the domain that is allowed to sign in to the organization
530549
531550 extra_headers: Send extra headers
@@ -545,6 +564,7 @@ async def create(
545564 "issuer_url" : issuer_url ,
546565 "organization_id" : organization_id ,
547566 "additional_scopes" : additional_scopes ,
567+ "claims_expression" : claims_expression ,
548568 "display_name" : display_name ,
549569 "email_domain" : email_domain ,
550570 "email_domains" : email_domains ,
@@ -616,6 +636,7 @@ async def update(
616636 sso_configuration_id : str ,
617637 additional_scopes : Optional [AdditionalScopesUpdateParam ] | Omit = omit ,
618638 claims : Dict [str , str ] | Omit = omit ,
639+ claims_expression : Optional [str ] | Omit = omit ,
619640 client_id : Optional [str ] | Omit = omit ,
620641 client_secret : Optional [str ] | Omit = omit ,
621642 display_name : Optional [str ] | Omit = omit ,
@@ -671,6 +692,10 @@ async def update(
671692
672693 claims: claims are key/value pairs that defines a mapping of claims issued by the IdP.
673694
695+ claims_expression: claims_expression is a CEL expression evaluated against OIDC token claims during
696+ login. When set, the expression must evaluate to true for the login to succeed.
697+ When present with an empty string, the expression is cleared.
698+
674699 client_id: client_id is the client ID of the SSO provider
675700
676701 client_secret: client_secret is the client secret of the SSO provider
@@ -694,6 +719,7 @@ async def update(
694719 "sso_configuration_id" : sso_configuration_id ,
695720 "additional_scopes" : additional_scopes ,
696721 "claims" : claims ,
722+ "claims_expression" : claims_expression ,
697723 "client_id" : client_id ,
698724 "client_secret" : client_secret ,
699725 "display_name" : display_name ,
0 commit comments