---
title: "Create a saml configuration"
method: POST
path: "/v3/accounts/{id}/saml-configuration"
tags: ["SamlConfigurations"]
---

# Create a saml configuration

`POST /v3/accounts/{id}/saml-configuration`

Creates a new saml configuration.

## Path parameters

- `id` string, required

## Request body

- SamlConfigurationCreateRequestModel
  - `metadataUrl` string, uri, required — SAML metadata xml url.
  - `assertionConsumerServiceUrl` string, uri, required — SAML assertion consumer service url.
  - `entityId` string, required — Entity Id of SAML service provider.
  - `autoProvisionUsers` boolean, required — Auto provision users.
  - `enabled` boolean, required — Enable or disable the SAML SSO.
  - `defaultRole` string, nullable — Default role assigned to the new users.
  - `samlRoleMappings` SamlRoleMappingRequestModel[], nullable — Role mapping.
    - `identityProviderRole` string, required — Identity provider role.
    - `serviceProviderRole` string, required — Service provider role.
  - `attributeMapping` SamlAttributeMappingRequestModel
    - `email` string[], nullable — SAML attribute name to map to the User email.
    - `firstName` string[], nullable — SAML attribute name to map to the User first name.
    - `lastName` string[], nullable — SAML attribute name to map to the User last name.
    - `role` string[], nullable — SAML attribute name to map to the User role.

## Response `200`

OK

- SamlConfigurationDto
  - `id` string, uuid, required
  - `createdAt` string, date-time, required
  - `updatedAt` string, date-time, required
  - `metadataUrl` string, required
  - `assertionConsumerServiceUrl` string, required
  - `entityId` string, required
  - `enabled` boolean, required
  - `autoProvisionUsers` boolean, required
  - `defaultRole` string, nullable
  - `samlRoleMappings` SamlRoleMappingDto[], required
    - `id` string, required
    - `createdAt` string, date-time, required
    - `updatedAt` string, date-time, required
    - `serviceProviderRole` string, required
    - `identityProviderRole` string, required
  - `attributeMapping` SamlAttributeMappingDto, required
    - `email` string[], required
    - `firstName` string[], required
    - `lastName` string[], required
    - `role` string[], required

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not Found
- `409` — Conflict
- `429` — Too Many Requests
- `500` — Server Error

---

[API](https://skmtc.net/cryptlex/apis/cryptlex-web-api.md) · [All operations](https://skmtc.net/cryptlex/apis/cryptlex-web-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/cryptlex/cryptlex-web-api/revisions/ec1259c12475/schema)
