> 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/cortex-xpanse/integrations/ingest-cloud-resources-from-prisma-cloud/generate-an-api-access-key-in-prisma-cloud.md).

# Generate an API Access Key in Prisma Cloud

Before configuring the Prisma Cloud API connector in Cortex Xpanse Expander, you must generate an API access key in Prisma Cloud. While generating the API access key, gather the following information which will be required to create the API connector in Expander:

* Access Key ID
* Secret Access Key
* Prisma Cloud API URL for your tenant

1. Log into Prisma Cloud CSPM as an Administrator level user.
2. Select **Settings** from the left-side menu.

   ![prisma-settings.png](/files/xBdcZdWRri63OdwSdR7D)
3. Within Settings, go to **Account Groups** and click **Add Account Group**.

   ![prisma-account-groups.png](/files/BEhDm0blJzLsjsfjCPT5)
4. Name the new account group, and select the cloud accounts that you want to be accessible for this group.

   ![prisma-account-group-setup.png](/files/rqxjWOC1Odn9bWnRCwdP)
5. After creating the new Account Group, select **Access Controls** → **Roles** from the left-side menu. Click **Add** to add a new role.

   ![prisma-access-control-roles.png](/files/NCWVYtLiqz5M3FnRgReG)
6. Give your new role a descriptive **Name**, select the permissions desired (the Xpanse integration requires a minimum of **Account Group Read Only**) and select your newly created Account Group (from step 4) as the **Account Group**.

   ![prisma-create-new-role.png](/files/AHdOyvxgRMclb2WiCT8f)
7. After creating the new role, go to **Access Control** → **Users** . Click **Add** and select **Service Account**.

   ![prisma-add-service-account.png](/files/XfbX45rjAKRki1x4UZ2a)
8. Give your new service account a descriptive **Service Account Name** and select your newly created role as the assigned **Role**. Click **Next**.

   ![prisma-service-account-details.png](/files/LsTCeVYpMQsHYc84M1eI)
9. On the **Access Key Details** screen, provide an **Access Key Name** for the generated access key. We recommend that you do not **Enable Expiration** for this access key since it will cause the connector to fail in Xpanse when the key expires.

   ![prisma-access-key-details.png](/files/EjAvhlTzEY7umKUpnskm)
10. Copy the generated **Access Key ID** and **Secret Access Key** and keep them secure. You will use these to configure a new API connector within Xpanse.

    ![prisma-access-key-results.png](/files/4OiUK7FbkfrsI5IIHZ5e)
11. Find the correct API URL to use by referencing this table.

    <https://prisma.pan.dev/api/cloud/api-urls/>


---

# 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/cortex-xpanse/integrations/ingest-cloud-resources-from-prisma-cloud/generate-an-api-access-key-in-prisma-cloud.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.
