Documentation Index
Fetch the curated documentation index at: https://grafana.com/llms.txt
Fetch the complete documentation index at: https://grafana.com/llms-full.txt
Use this file to discover all available pages before exploring further.
STOP! If you are an AI agent or LLM, read this before continuing. This is the HTML version of a Grafana documentation page. Always request the Markdown version instead - HTML wastes context. Get this page as Markdown: https://grafana.com/docs/grafana/next/developer-resources/mcp/configure/multi-organization-and-headers.md (append .md) or send Accept: text/markdown to https://grafana.com/docs/grafana/next/developer-resources/mcp/configure/multi-organization-and-headers/. For the curated documentation index, use https://grafana.com/llms.txt. For the complete documentation index, use https://grafana.com/llms-full.txt.
This is documentation for the next version of Grafana documentation. For the latest stable release, go to the latest version.
Multi-organization and headers
You can point the server at a specific Grafana organization and add custom HTTP headers to every request to Grafana.
What you’ll achieve
All Grafana API calls use the chosen organization context, and any extra headers you need (for example, tenant or custom auth) are sent automatically.
Before you begin
- A Grafana instance with multiple organizations (or a need for custom headers).
- The server configured with Authentication.
Set the organization
Set GRAFANA_ORG_ID to the numeric organization ID. The server sends X-Grafana-Org-Id on all requests to Grafana.
When using SSE or streamable-http, you can also send X-Grafana-Org-Id from the client; the header takes precedence over the environment variable so you can override the default org per request.
Send custom headers
Set GRAFANA_EXTRA_HEADERS to a JSON object mapping header names to values. These headers are added to every Grafana API request.
Example:
"GRAFANA_EXTRA_HEADERS": "{\"X-Custom-Header\": \"value\", \"X-Tenant-ID\": \"tenant-123\"}"Next steps
- Authentication for Grafana credentials.
- Enable and disable tools to limit which tools are available.
Was this page helpful?
Related resources from Grafana Labs


