Documentation Index

Fetch the complete documentation index at: https://developer.rocket.chat/llms.txt

Use this file to discover all available pages before exploring further.

Parse SAML IdP Metadata

Prev Next
Post
/api/v1/saml.parseMetadata

Fetches and parses a SAML identity provider (IdP) metadata document from a URL. It returns the IdP certificate, sign-in URL, sign-out URL, and identifier format when those values are available in the metadata.

The Import IdP metadata button at the top of Manage > Workspace > Settings > SAML uses this endpoint to prefill the corresponding SAML settings. The imported values can be reviewed and edited before they are saved. This endpoint does not save or change any workspace settings.

The metadata request is subject to SSRF protection and the workspace's SSRF allowlist. It has a 20-second timeout and a 1 MB response-size limit.

Permission required:

  • test-admin-options

Changelog

Version Description
8.8.0 Added
Header parameters
X-Auth-Token
stringRequired

The authenticated user token.

ExampleRScctEHSmLGZGywfIhWyRpyofhKOiMoUIpimhvheU3f
X-User-Id
stringRequired

The authenticated user ID.

ExamplerbAXPnMktTFbNpwtJ
Body parameters
Example
{
  "url": "https://idp.example.com/metadata"
}
object
url
string Required

The URL of the SAML IdP metadata document.

Min length1
Examplehttps://idp.example.com/metadata
Responses
200

The metadata was parsed successfully.

Success
{
  "entryPoint": "https://idp.example.com/sso/saml",
  "idpSLORedirectURL": "https://idp.example.com/slo/saml",
  "cert": "-----BEGIN CERTIFICATE-----\nMIIDdzCCAl+gAwIBAgIEXAMPLEONLY\n-----END CERTIFICATE-----",
  "identifierFormat": "urn:oasis:names:tc:SAML:2.0:nameid-format:persistent",
  "warnings": [],
  "success": true
}
object
entryPoint
string

The IdP URL where Rocket.Chat sends SAML sign-in requests.

idpSLORedirectURL
string

The IdP URL where Rocket.Chat sends SAML sign-out requests.

cert
string

The IdP signing certificate in PEM format.

identifierFormat
string

The first SAML NameID format found in the metadata. The SAML settings page applies this value when the Enterprise-only Identifier Format setting is available.

warnings
Array of string

Warnings about missing or multiple usable values in the metadata.

string
success
boolean
Valid values[ true ]
400

The request is invalid, the metadata cannot be fetched or parsed, or the URL is blocked.

URL blocked
{
  "success": false,
  "error": "SAML_Metadata_url_blocked"
}
Fetch failed
{
  "success": false,
  "error": "SAML_Metadata_fetch_failed"
}
Metadata too large
{
  "success": false,
  "error": "SAML_Metadata_too_large"
}
Invalid metadata
{
  "success": false,
  "error": "SAML_Metadata_invalid"
}
object
success
boolean
Valid values[ false ]
error
string
errorType
string
401

Unauthorized

Authorization Error
{
  "status": "error",
  "message": "You must be logged in to do this."
}
object
status
string
message
string
403

Forbidden

Permission Error
{
  "success": false,
  "error": "User does not have the permissions required for this action [error-unauthorized]"
}
object
success
boolean
error
string