SamlConnectionsService
A list of all methods in the SamlConnectionsService service. Click on the method name to view detailed information about that method.
| Methods | Description |
|---|---|
| list_saml_connections | Returns a list of SAML connections. The connections are scoped by the current user and returned from Clerk |
| create_saml_connection | Creates a new SAML connection |
| get_saml_connection_by_id | Checks whether a user has a SAML connection and then hydrates the connection from Clerk |
| update_saml_connection_by_id | Checks whether a user owns a SAML connection and then updates the SAML connection |
| delete_saml_connection_by_id | Deletes a SAML connection by its ID |
list_saml_connections
Returns a list of SAML connections. The connections are scoped by the current user and returned from Clerk
- HTTP Method:
GET - Endpoint:
/samlConnection
Return Type
SamlConnections
Example Usage Code Snippet
from test_sdk import TestSdk
sdk = TestSdk(
access_token="YOUR_ACCESS_TOKEN",
timeout=10000
)
result = sdk.saml_connections.list_saml_connections()
print(result)
create_saml_connection
Creates a new SAML connection
- HTTP Method:
POST - Endpoint:
/samlConnection
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| request_body | SamlConnectionParams | ❌ | The request body. |
Return Type
SamlConnection
Example Usage Code Snippet
from test_sdk import TestSdk
from test_sdk.models import SamlConnectionParams
sdk = TestSdk(
access_token="YOUR_ACCESS_TOKEN",
timeout=10000
)
request_body = SamlConnectionParams(
name="name",
domain="domain",
idp_entity_id="idp_entity_id",
idp_sso_url="idp_sso_url",
idp_certificate="idp_certificate"
)
result = sdk.saml_connections.create_saml_connection(request_body=request_body)
print(result)
get_saml_connection_by_id
Checks whether a user has a SAML connection and then hydrates the connection from Clerk
- HTTP Method:
GET - Endpoint:
/samlConnection/{saml_connection_id}
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| saml_connection_id | str | ✅ | The ID of the SAML connection to retrieve |
Return Type
SamlConnection
Example Usage Code Snippet
from test_sdk import TestSdk
sdk = TestSdk(
access_token="YOUR_ACCESS_TOKEN",
timeout=10000
)
result = sdk.saml_connections.get_saml_connection_by_id(saml_connection_id="saml_connection_id")
print(result)
update_saml_connection_by_id
Checks whether a user owns a SAML connection and then updates the SAML connection
- HTTP Method:
PUT - Endpoint:
/samlConnection/{saml_connection_id}
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| request_body | SamlConnectionUpdateParams | ✅ | The request body. |
| saml_connection_id | str | ✅ | The ID of the SAML connection to update |
Return Type
SamlConnection
Example Usage Code Snippet
from test_sdk import TestSdk
from test_sdk.models import SamlConnectionUpdateParams
sdk = TestSdk(
access_token="YOUR_ACCESS_TOKEN",
timeout=10000
)
request_body = SamlConnectionUpdateParams(
name="name",
domain="domain",
idp_entity_id="idp_entity_id",
idp_sso_url="idp_sso_url",
idp_certificate="idp_certificate",
active=False
)
result = sdk.saml_connections.update_saml_connection_by_id(
request_body=request_body,
saml_connection_id="saml_connection_id"
)
print(result)
delete_saml_connection_by_id
Deletes a SAML connection by its ID
- HTTP Method:
DELETE - Endpoint:
/samlConnection/{saml_connection_id}
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| saml_connection_id | str | ✅ | The ID of the SAML connection to update |
Example Usage Code Snippet
from test_sdk import TestSdk
sdk = TestSdk(
access_token="YOUR_ACCESS_TOKEN",
timeout=10000
)
result = sdk.saml_connections.delete_saml_connection_by_id(saml_connection_id="saml_connection_id")
print(result)