[role="xpack"] [[saml-metadata]] == saml-metadata The `saml-metadata` command can be used to generate a SAML 2.0 Service Provider Metadata file. [float] === Synopsis [source,shell] -------------------------------------------------- bin/x-pack/saml-metadata [--realm ] [--out ] [--batch] [--attribute ] [--service-name ] [--locale ] [--contacts] ([--organisation-name ] [--organisation-display-name ] [--organisation-url ]) [-E ] [-h, --help] ([-s, --silent] | [-v, --verbose]) -------------------------------------------------- [float] === Description The SAML 2.0 specification provides a mechanism for Service Providers to describe their capabilities and configuration using a _metadata file_. The `saml-metadata` command generates such a file, based on the configuration of a SAML realm in {es}. Some SAML Identity Providers will allow you to automatically import a metadata file when you configure the Elastic Stack as a Service Provider. [float] === Parameters `--attribute `:: Specifies a SAML attribute that should be included as a `` element in the metadata. Any attribute configured in the {es} realm is automatically included and does not need to be specified as a commandline option. `--batch`:: Do not prompt for user input. `--contacts`:: Specifies that the metadata should include one or more `` elements. The user will be prompted to enter the details for each person. `-E `:: Configures an {es} setting. `-h, --help`:: Returns all of the command parameters. `--locale `:: Specifies the locale to use for metadata elements such as ``. Defaults to the JVM's default system locale. `--organisation-display-name ` element. Only valid if `--organisation-name` is also specified. `--organisation-name `:: Specifies that an `` element should be included in the metadata and provides the value for the ``. If this is specified, then `--organisation-url` must also be specified. `--organisation-url `:: Specifies the value of the `` element. This is required if `--organisation-name` is specified. `--out `:: Specifies a path for the output files. Defaults to `saml-elasticsearch-metadata.xml` `--service-name `:: Specifies the value for the `` element in the metadata. Defaults to `elasticsearch`. `--realm `:: Specifies the name of the realm for which the metadata should be generated. This parameter is required if there is more than 1 `saml` realm in your {es} configuration. `-s, --silent`:: Shows minimal output. `-v, --verbose`:: Shows verbose output. [float] === Examples The following command generates a default metadata file for the `saml1` realm: [source, sh] -------------------------------------------------- bin/x-pack/saml-metadata --realm saml1 -------------------------------------------------- The file will be written to `saml-elasticsearch-metadata.xml`. You may be prompted to provide the "friendlyName" value for any attributes that are used by the realm. The following command generates a metadata file for the `saml2` realm, with a `` of `kibana-finance`, a locale of `en-GB` and includes `` elements and an `` element: [source, sh] -------------------------------------------------- bin/x-pack/saml-metadata --realm saml2 \ --service-name kibana-finance \ --locale en-GB \ --contacts \ --organisation-name "Mega Corp. Finance Team" \ --organisation-url "http://mega.example.com/finance/" --------------------------------------------------