> For the complete documentation index, see [llms.txt](https://docs.p0.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.p0.dev/integrations/resource-integrations/grafana-cloud.md).

# Grafana Cloud

{% hint style="info" %}
Grafana Cloud is a **preview** integration. The setup takes about 5 minutes.
{% endhint %}

The Grafana Cloud integration lets P0 grant just-in-time, time-limited access to your Grafana Cloud teams. P0 connects to your Grafana Cloud stack through its SCIM API and manages team membership as access is requested, approved, and revoked.

## How it works

P0 manages access at the **team** level within a Grafana Cloud organization:

1. A user requests access to a Grafana Cloud team through P0.
2. After approval, P0 provisions the user in your Grafana Cloud stack through the SCIM API (if the user does not already exist) and adds them to the requested team.
3. When the access duration expires or an approver revokes access, P0 removes the user from the team. The user's Grafana Cloud account remains in place.

P0 uses the user's email address as the canonical identity when provisioning the account.

## Before you begin

To set up the Grafana Cloud integration, you need:

* A **Grafana Cloud** account with administrator access.
* The **SCIM provisioning** feature enabled for your Grafana Cloud stack.
* A **Grafana service account** with the `User administration:Write` and `Teams:Write` roles, and a service-account token for it.
* Your Grafana Cloud **stack ID**, shown on the SCIM authentication plugin configuration page in Grafana Cloud.
* A **P0 account** with administrator access.

## Setting up Grafana Cloud

P0 stores the SCIM service-account token as an encrypted secret and uses it to call the Grafana Cloud SCIM API for your stack.

1. Log in to [p0.app](https://p0.app) and navigate to the **Integrations** page.
2. Under **Resources**, select **Grafana Cloud**.
3. Select the **Team management** component.
4. Enter the **Organization identifier** for your Grafana Cloud organization. This is the `<organization>` part of your Grafana Cloud URL (`<organization>.grafana.net`). Click **Next**.
5. Enter the following values:

   | Field                          | Value                                                                                                 |
   | ------------------------------ | ----------------------------------------------------------------------------------------------------- |
   | **SCIM service-account token** | The token for a Grafana service account with the `User administration:Write` and `Teams:Write` roles. |
   | **Grafana stack ID**           | The **Stack ID** shown on your Grafana Cloud SCIM authentication plugin configuration page.           |
6. Click **Finish**.

{% hint style="success" %}
P0 can now manage just-in-time access to your Grafana Cloud teams. See [Requesting access](/integrations/resource-integrations/grafana-cloud/requesting-access.md) to make your first request.
{% endhint %}

## Additional resources

* [Requesting access](/integrations/resource-integrations/grafana-cloud/requesting-access.md)
* [Grafana SCIM provisioning documentation](https://grafana.com/docs/grafana/latest/setup-grafana/configure-access/configure-scim-provisioning/)
