> 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/duo-for-single-sign-on/define-duo-to-authenticate-cortex-xsoar.md).

# Define Duo to authenticate Cortex XSOAR

Before you start, [create a Duo group for Cortex XSOAR users](/xsoar-6-administrator-guide/6.14/onboard-cortex-xsoar/users-and-roles/authenticate-users-with-saml-2.0/duo-for-single-sign-on/create-duo-groups-for-cortex-xsoar-users.md).

1. Log in to Duo and click **Applications**.
2. Click **Protect an Application**.
3. Find **Generic Service Provider - 2FA with SSO hosted by Duo (Single Sign-On)** in the application list and click **Protect**.

   ![duo-generic-service-provider.png](/files/9EMeXLVCFAr6k8455Oro)
4. In the Service Provider section, enter the following, using the url of your Cortex XSOAR installation:

   | Parameter                  | Value                                    |
   | -------------------------- | ---------------------------------------- |
   | Entity ID                  | https\:// `<cortexxsoarURL>`             |
   | Assertion Consumer Service | https\:// `<cortexxsoarURL>`/saml        |
   | Single Logout URL          | https\:// `<cortexxsoarURL>`/saml-logout |
   | Service Provider Login URL | Keep this field blank.                   |
   | Default Relay State        | Keep this field blank.                   |
5. In the SAML Response section, change the following:
   1. Change the **NameID format** drop-down from **`urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress`** to **`urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified`**.

      ![duo-nameid-format.png](/files/yT9A8M8LMU8NrDWwJmrg)
   2. Leave **NameID attribute** as **`<Email Address>`** and **Signature algorithm** as **`SHA256`**.
   3. In the **Signing Options** section, clear the **`Sign assertion`** checkbox.

      ![duo-signing-option.png](/files/m653YDVNvUOkFo7caBUL)
6. Map attributes:

   | IdP Attribute    | SAML Response Attribute |
   | ---------------- | ----------------------- |
   | \<Username>      | urn                     |
   | \<Email Address> | Email                   |
   | \<First Name>    | FirstName               |
   | \<Last Name>     | LastName                |
7. Role attributes:

   | Parameter               | Value                                                              |
   | ----------------------- | ------------------------------------------------------------------ |
   | Attribute name          | memberOf                                                           |
   | Service Provider’s Role | The SAML role in Cortex XSOAR that will be mapped to the Duo group |
   | Duo Groups              | The Duo group you created                                          |
8. Click **Save**.


---

# 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/duo-for-single-sign-on/define-duo-to-authenticate-cortex-xsoar.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.
