---
title: "generate a turnkey SAML identity provider"
method: PUT
path: "/mockserver/saml"
tags: ["saml"]
---

# generate a turnkey SAML identity provider

`PUT /mockserver/saml`

## Request

- Base URL: `http://localhost:1080`
- URL: `http://localhost:1080/mockserver/saml`
- Auth: none declared

Generates a set of expectations that emulate a SAML 2.0 identity provider (metadata, single sign-on and single logout endpoints) and adds them. An empty body uses the default provider configuration.

## Request body

- object: SAML provider configuration; an empty body uses defaults
  - `idpEntityId` string: identity provider entity ID advertised in metadata
  - `spEntityId` string: service provider entity ID the assertions are issued for
  - `signingCertificatePem` string: PEM-encoded X.509 certificate used to verify signed assertions
  - `signingPrivateKeyPem` string: PEM-encoded private key used to sign assertions

## Response `201`

SAML provider expectations created

- Expectation[]: list of upserted expectations (unresolved $ref)

## Other responses

- `400`: incorrect request format

---

[API](https://skmtc.dev/mock-server/apis/mockserver-api.md) · [All operations](https://skmtc.dev/mock-server/apis/mockserver-api/llms.txt) · [OpenAPI document](https://skmtc.dev/mock-server/apis/mockserver-api/revisions/9239b693996e?raw)
