Retrieve the name of the organization auto-assigned to your personal access tokens.
Before You Begin
🔗 Use the GraphQL Playground to execute the queries in this guide.
➡️ New to GraphQL? Learn how to navigate the Playground with our Playground Basics Guide.
Prerequisites
- Authentication: Use a Service Account token (Personal Access Tokens are deprecated).
- Permissions: The query is scoped to the authenticated user — it only reads your own tokens. No extra permission is required.
- No arguments: The query takes no input; it operates on the current user resolved from your token.
Step 1: Query the Auto-assigned Organization Name
Use the autoAssignedTokenOrganizationName query to retrieve the name of the organization that has
been auto-assigned to your personal tokens. This powers the auto-assignment alert banner in the
product.
query {
autoAssignedTokenOrganizationName
}
Step 2: Execute and Interpret the Response
The query returns a single nullable String. When an organization is auto-assigned to your
personal tokens, its name is returned:
{
"data": {
"autoAssignedTokenOrganizationName": "Example Org"
}
}
When there is no organization to surface, the value is null:
{
"data": {
"autoAssignedTokenOrganizationName": null
}
}
Key Notes
- Nullable result:
nullmeans the alert should not be shown — either no qualifying token
exists for your user, or the feature is not enabled for you. - User-scoped: The query reads only the authenticated user's own personal tokens; it never
exposes other users' data. - Read-only: This is a query and has no side effects.

