# How to Use GraphQL Admin API to Get User Details of a Space/Organization

**URL:** <https://forum.builder.io/t/how-to-use-graphql-admin-api-to-get-user-details-of-a-space-organization/13182>\
**Category:** Technical Questions\
**Tags:** organization, admin-api, users, spa, email\
**Created:** [February 28, 2025, 4:09pm UTC](https://forum.builder.io/t/how-to-use-graphql-admin-api-to-get-user-details-of-a-space-organization/13182 "2025-02-28T16:09:35Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![manish-sharma](https://avatars.discourse-cdn.com/v4/letter/m/8797f3/32.png) [@manish-sharma](https://forum.builder.io/u/manish-sharma)\
**Post date:** [February 28, 2025, 4:09pm UTC](https://forum.builder.io/t/how-to-use-graphql-admin-api-to-get-user-details-of-a-space-organization/13182/1 "2025-02-28T16:09:35Z")

</div>

If you need to fetch user details from your [Builder.io](http://Builder.io) Space or Organization via the GraphQL Admin API, this guide will walk you through the process.

To access the Admin API, authenticate using your Space’s or Organization’s [private API key](https://www.builder.io/c/docs/using-your-api-key#managing-private-keys). The API is available at the following endpoint:

```auto
https://cdn.builder.io/api/v2/admin

```

Include your private API key in the request’s `Authorization` header:

```json
{
  "Authorization": "Bearer bpk-xx"
}

```

### Querying Users

To fetch a list of users in your Space or Organization, use this GraphQL query:

```graphql
{
  users {
    id
    name
    email
    role
    lastActive
  }
}

```

### Example API Request

Make a `POST` request to `https://cdn.builder.io/api/v2/admin` with the following JSON payload:

```json
{
  "query": "{ users { id name email role lastActive } }"
}

```

### Sample Response

A successful request will return a JSON response similar to this:

```json
{
  "data": {
    "users": [
      {
        "id": "user-123",
        "name": "John Doe",
        "email": "john.doe@example.com",
        "role": "admin",
        "lastActive": "2025-02-28T12:00:00Z"
      },
      {
        "id": "user-456",
        "name": "Jane Smith",
        "email": "jane.smith@example.com",
        "role": "editor",
        "lastActive": "2025-02-27T15:45:00Z"
      }
    ]
  }
}

```

 ![Screenshot 2025-02-28 at 9.32.45 PM](https://us1.discourse-cdn.com/flex020/uploads/builder/original/2X/7/7b45a6726829cdee06bd5d630131d6858a90420f.png)

The [Builder.io](http://Builder.io) Admin API supports additional queries and mutations for managing your Space or Organization. Refer to the official [Builder.io Admin API documentation](https://www.builder.io/c/docs/admin-graphql-api) for more details.

[https://builder.io/api/v2/admin](https://builder.io/api/v2/admin)

> **[Using the Builder API Key](https://www.builder.io/c/docs/using-your-api-key#managing-private-keys)**
>
> Builder is an AI-Powered Visual Development Platform that helps teams generate, iterate, and optimize web and mobile experiences in seconds instead of sprints.

> **[Content API](https://www.builder.io/c/docs/content-api)**
>
> Learn how to use Builder's Content API to make requests to retrieve data about any of your models. Write queries with dot notation and MongoDB style operators.

Hope this helps! Let me know if you have any questions.

Thanks,
