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

# Connect Grafana with Service Account Token – StackOne Hub

> Link a Grafana account in the StackOne Hub using Service Account Token. End-user guide to authorize the integration and start using Grafana actions.

Select Actions to adjust the guideSome actions may require additional configuration in the provider to be accessible. Choose the actions you need and the guide will be updated.

Select all
Clear

ActionScope(s)

Loading actions...No actions match your search.

Dynamic Guide URL

Copy URL

Scopes Selected

<pre role="textbox" aria-readonly="true" tabIndex="0" />

Separator

Copy scopes

## Generate a Service Account Token

A Service Account Token provides programmatic access to your Grafana instance.

**1. Sign in to Grafana**

Sign in to your [Grafana account](https://grafana.com/auth/sign-in).

<ul>
  <li>Navigate to **Administration** > **Users and access** > **Service Accounts**.</li>
</ul>

**2. Create a Service Account**

Click **Add service account** and configure the following.

<ul>
  <li>Enter a descriptive name (e.g., `StackOne Integration`).</li>
  <li>Select the **Admin** role for full access, or select **No Basic Role** and select individual permissions (see below).</li>
</ul>

**3. Select permissions**

Enables actions: Add Organization User, Add Team Member, Create Alert Rule, Create Annotation, Create Contact Point, Create Correlation, Create Dashboard, Create Data Source, Create Folder, Create Library Element, Create Mute Timing, Create Playlist, Create Service Account, Create Service Account Token, Create Snapshot, Create Team, Delete Alert Rule, Delete Annotation, Delete Contact Point, Delete Correlation, Delete Dashboard, Delete Data Source, Delete Folder, Delete Library Element, Delete Mute Timing, Delete Playlist, Delete Service Account, Delete Service Account Token, Delete Snapshot, Delete Team, Get Alert Rule, Get Dashboard, Get Dashboard Permissions, Get Dashboard Version, Get Data Source, Get Folder, Get Folder Permissions, Get Home Dashboard, Get Library Element, Get Mute Timing, Get Notification Policies, Get Organization, Get Organization Preferences, Get Playlist, Get Service Account, Get Snapshot, Get Team, Get Unified Group, Get Unified Organization, Get Unified Role, Get Unified User, List Alert Rules, List Annotation Tags, List Annotations, List Contact Points, List Correlations, List Dashboard Tags, List Dashboard Versions, List Data Sources, List Folders, List Library Elements, List Mute Timings, List Organization Users, List Playlists, List Service Account Tokens, List Service Accounts, List Snapshots, List Team Members, List Teams, List Unified Groups, List Unified Organizations, List Unified Resource Types, List Unified Resource Users, List Unified Roles, List Unified Users, Remove Organization User, Remove Team Member, Search Dashboards, Star Dashboard, Unstar Dashboard, Update Alert Rule, Update Annotation, Update Contact Point, Update Dashboard Permissions, Update Data Source, Update Folder, Update Folder Permissions, Update Library Element, Update Mute Timing, Update Notification Policies, Update Organization, Update Organization Preferences, Update Organization User Role, Update Playlist, Update Service Account, Update Team

If not using **Admin** role, select the permissions for your use case:

<ul>
  <li>
    dashboards:read
  </li>

  <li>
    dashboards:write
  </li>

  <li>
    dashboards.permissions:read
  </li>

  <li>
    dashboards.permissions:write
  </li>

  <li>
    folders:read
  </li>

  <li>
    folders:write
  </li>

  <li>
    folders.permissions:read
  </li>

  <li>
    folders.permissions:write
  </li>

  <li>
    annotations:read
  </li>

  <li>
    annotations:write
  </li>

  <li>
    alert.rules:read
  </li>

  <li>
    alert.rules:write
  </li>

  <li>
    alert.provisioning:read
  </li>

  <li>
    alert.provisioning:write
  </li>

  <li>
    datasources:read
  </li>

  <li>
    datasources:write
  </li>

  <li>
    playlists:read
  </li>

  <li>
    playlists:write
  </li>

  <li>
    orgs:read
  </li>

  <li>
    orgs:write
  </li>

  <li>
    org.users:read
  </li>

  <li>
    org.users:write
  </li>

  <li>
    teams:read
  </li>

  <li>
    teams:write
  </li>

  <li>
    teams.permissions:read
  </li>

  <li>
    teams.permissions:write
  </li>

  <li>
    serviceaccounts:read
  </li>

  <li>
    serviceaccounts:write
  </li>

  <li>
    library.panels:read
  </li>

  <li>
    library.panels:write
  </li>

  <li>
    snapshots:read
  </li>

  <li>
    snapshots:write
  </li>
</ul>

**4. Generate a token**

Click on the newly created service account, then click **Add service account token**.

<ul>
  <li>Enter a token name (e.g., `stackone-token`).</li>
  <li>Optionally set an expiration date.</li>
  <li>Click **Generate token** and copy the token immediately — store it securely for use later.</li>
</ul>

## Find your instance URL

Your instance URL identifies your organization's Grafana environment. Include a trailing slash.

<ul>
  <li>Check your browser address bar when signed in to Grafana.</li>
  <li>Format: `https://{your-org}.grafana.net/`</li>
  <li>Example: if your URL is `https://acme.grafana.net/dashboards`, your instance URL is `https://acme.grafana.net/`</li>
  <li>For self-hosted instances, use your Grafana domain (e.g., `https://grafana.yourcompany.com/`)</li>
</ul>

## Link the Account

**1. Connect**

<ul>
  <li>Click **Connect**.</li>
  <li>If applicable, the provider will redirect you to a sign-in or authorization page. Complete the provider's authorization flow.</li>
  <li>Once authorization is successful, you will see a confirmation popup.</li>
</ul>

**2. Use Actions**

Connect an AI platform to the linked account's actions. See [AI Platforms](https://docs.stackone.com/connect/ai-platforms/overview.md).

Other ways to call actions are listed in [Protocols & SDKs](https://docs.stackone.com/connect/protocols-and-sdks.md).

## Next Steps

> [card] [Webhooks setup](https://docs.stackone.com/connectors/grafana/guides/webhook-setup.md)
>
> Configure receiving Events for Grafana into StackOne.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.