> ## Documentation Index
> Fetch the complete documentation index at: https://auth0.com/llms.txt
> Use this file to discover all available pages before exploring further.

> Describes how to work with certificates or keys in rules or Management API requests to require a string representation of the file.

# Work with Certificates and Keys as Strings

You can use the following command in a UNIX shell to concatenate a PEM-formatted certificate with `\n` (escaped new-line):

```bash wrap lines theme={null}
awk 'NF {sub(/\r/, ""); printf "%s\\n",$0;}' certificate.pem | pbcopy
```

This copies the value into to your clipboard buffer so you can paste it where needed.

### More information

When working with certificates or keys in rules or <Tooltip tip="Management API: A product to allow customers to perform administrative tasks." cta="View Glossary" href="/docs/glossary?term=Management+API">Management API</Tooltip> v2 requests, you will most likely require a string representation of the file.

If you open a certificate file (`cer`, `pem`) with a text editor, you'll see something like this:

```text lines theme={null}
-----BEGIN CERTIFICATE-----
MIICzDCCAbQCCQDH8GvxPIeH+DANBgkqhkiG9w0BAQsFADAoMQswCQYDVQQGEwJh
cjEZMBcGA1UEAwwQaHR0cHM6Ly9uaWNvLmNvbTAeFw0xOTA0MDgxODA3NTVaFw0y
//
// more lines of base64-encoded information
//
nSWyabd+LiBGtLTMB+ZLbOIi3EioWPGw/nHOI8jzPrqhiCLuZCSQmiqrLQYNsc1W
-----END CERTIFICATE-----
```

The lines between the `-----BEGIN CERTIFICATE-----` header and `-----END CERTIFICATE-----` footer contain base64-encoded binary information. Public keys and private keys (.key files) will look similar, with just a different header/footer.

For a string representation of a certificate/key file, you will need to concatenate everything in one line, with a `\n` (escaped new-line) sequence replacing the actual new lines in the file. So from the above sample you'd obtain something like this:

```text lines theme={null}
"-----BEGIN CERTIFICATE-----
\nMIICzDCCAbQCCQDH8GvxPIeH+DANBgkqhkiG9w0BAQsFADAoMQswCQYDVQQGEwJh\n
[..all the other lines..]
-----END CERTIFICATE-----\n"
```

## Learn more

* [Configure Auth0 as SAML Identity Provider](/docs/authenticate/single-sign-on/outbound-single-sign-on/configure-auth0-saml-identity-provider)
* [Configure Auth0 as SAML Service Provider](/docs/authenticate/protocols/saml/saml-sso-integrations/configure-auth0-saml-service-provider)
