---
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/4371/api/doc/cloud-enterprise/operation/operation-get-organization-idp-metadata
resource: https://www.elastic.co/elastic/docs-builder/docs/4371/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`

- [Basic auth](/elastic/docs-builder/docs/4371/api/doc/cloud-enterprise/authentication#basicauth)
- [Api key auth](/elastic/docs-builder/docs/4371/api/doc/cloud-enterprise/authentication#apikey)

#### Path Parameters

- `organization_id` (string)
  Identifier for the Organization

## Description

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

## Responses

#### `200`

The IdP info

`application/xml`

Type: `string`

#### `404`

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

`application/xml`

- `errors` ([] BasicFailedReplyElement)
  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

#### Console

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

#### curl

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

