> For the complete documentation index, see [llms.txt](https://cortex-docs.paloaltonetworks.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cortex-docs.paloaltonetworks.com/xsoar-6-administrator-guide/6.14/onboard-cortex-xsoar/users-and-roles/authenticate-users-with-saml-2.0/set-up-saml-logout.md).

# Set Up SAML Logout

The SAML provider is a user authentication third-party provider that helps to manage users. When you log in, the provider checks if you are a valid user. If you are authenticated, the provider assigns a session ID to you which is valid for a period of time. The next time you log in, you do not need a password, because the session is still valid from the previous login, even if you logged out of Cortex XSOAR. If you log out via SAML, the provider invalidates the session and the next time you log in to the system you need to enter a password.

To set up SAML logout, you need to create a SAML integration with a public/private key pair. You can:

* Use a self signed certificate.
* Purchase a certificate from a third-party authority.

1. (Optional) To use a self signed certificate:
   1. Create the public/private key pair by running the following command:

      **`openssl req -x509 -sha256 -nodes -days 365 -newkey rsa:2048 -keyout privateKey.key -out certificate.crt`**

      The following two files are created:

      * **certificate.crt** - Public key
      * **privateKey.key** - Private key (encrypted)
   2. For the Cortex XSOAR SAML integration, the private key needs to be unencrypted. Run the following command:

      **`openssl rsa -in privateKey.key -out private_unencrypted.key -outform PEM`**

      The following file is created: **private\_unencrypted.key** - Private key (unencrypted)
2. Go to **Settings** → **Integrations** → **Instances**.
3. Search for **SAML 2.0**.
4. Click **Add instance** to configure a new integration.
5. In the **Service Provider Entity ID** field, enter the Cortex XSOAR SAML address.
6. Click the **Sign request and verify response signature** option.
7. From your identity provider, copy the content of the public certificate file and paste it into the **IdP public certificate** field of the Cortex XSOAR SAML instance.
8. Copy the content of your **private\_unencrypted.key** file and paste it into the **IdP private key** field.
9. In your identity provider application:
   1. Select the **Enable Single Logout** option (if applicable).
   2. In the **Signature certificate** field, upload the **certificate.crt** file.
   3. Copy the IdP Single Logout URL.
10. In the **IdP Single Logout URL** field of the SAML instance, paste the **IdP Single Logout URL** that you copied in the previous step.

    ![saml-logout.png](/files/KiNFyz93ldMuwvdeTQlq)
11. In the **Single Logout Service Endpoint** field, type the Cortex XSOAR SAML logout address.

    https\://<`xsoarServer`>.com<`port`>/saml-logout
12. Click **Done**.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://cortex-docs.paloaltonetworks.com/xsoar-6-administrator-guide/6.14/onboard-cortex-xsoar/users-and-roles/authenticate-users-with-saml-2.0/set-up-saml-logout.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
