---
type: api
title: Get organization service provider SAML2 metadata.xml for configuring the identity provider
description: Gets the oranization's IdP metadata.xml. Currently unavailable in self-hosted ECE.
url: https://www.elastic.co/elastic/docs-builder/docs/4493/api/doc/cloud-enterprise/operation/operation-get-organization-idp-metadata
resource: https://www.elastic.co/elastic/docs-builder/docs/4493/api/doc/cloud-enterprise/operation/operation-get-organization-idp-metadata
products:
  - Elastic Cloud Enterprise
---

# Get organization service provider SAML2 metadata.xml for configuring the identity provider

## Paths

- `GET` `/organizations/{organization_id}/idp/metadata.xml`

#### Path parameters

- `organization_id` (string) — required
  Identifier for the Organization

## Description

Gets the oranization's IdP metadata.xml. Currently unavailable in self-hosted ECE.

## Authentication

- Basic: `Authorization: Basic <credentials>`
- Api key: `Authorization: <value>`

## Responses

#### `200`

The IdP info

`application/xml`

Type: `string`

#### `404`

IdP was not configured yet. (code: `org.idp.idp_not_configured`)

`application/xml`

- `errors` (object[])
  A list of errors that occurred in the failing request
  - `code` (string)
    A structured code representing the error type that occurred
  - `message` (string)
    A human readable message describing the error that occurred
  - `fields` (string[])
    If the error can be tied to a specific field or fields in the user request, this lists those fields
##### Response headers

- `x-cloud-error-codes` (enum)
  The error codes associated with the response

## Code examples

#### curl

```curl
curl -X GET "${API_URL}/organizations/${ORGANIZATION_ID}/idp/metadata.xml" \
  -u "${USERNAME}:${PASSWORD}"
```

