> For the complete documentation index, see [llms.txt](https://docs.inabit.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.inabit.com/api-reference/develop-with-inabit-api/organizations/organization-users.md).

# Organization Users

## Fetch Organization Users

Retrieving all organization users, per organization. This is done through querying the organization agents information.

For example: Let's get the organization users names and roles.

```graphql
query Organization($where: OrganizationWhereUniqueInput!) {
	organization(where: $where) {
		agents {
			firstName
			lastName
			roles
		}
	}
}
```

### **Headers**

| Name          | Value              |
| ------------- | ------------------ |
| Content-Type  | `application/json` |
| Authorization | `Bearer <token>`   |

### **Body (**<mark style="color:orange;">OrganizationWhereUniqueInput</mark> object)

| Name                                 | Type   | Description                                                                                                        |
| ------------------------------------ | ------ | ------------------------------------------------------------------------------------------------------------------ |
| id<mark style="color:red;">\*</mark> | string | <p>Organization ID. <br>See <a data-mention href="/pages/hYK7jk8MfCxi2CZmSHoW">/pages/hYK7jk8MfCxi2CZmSHoW</a></p> |

[Example body:](#user-content-fn-1)[^1]

```graphql
{
  "where": {
    "id": "organizationId123"
  }
}
```

### **Response**

Returned values:

| Name      | Type   | Description     |
| --------- | ------ | --------------- |
| firstName | string | User first name |
| lastName  | string | User last name  |
| roles     | JSON   | Array of roles  |

{% tabs %}
{% tab title="🟢 200" %}

```json
{
	"data": {
		"organization": {
			"agents": [
				{
					"firstName": "Ahmad",
					"lastName": "Carter",
					"roles": [
						"viewer"
					]
				},
				{
					"firstName": "Oda",
					"lastName": "Pfeffer",
					"roles": [
						"signer"
					]
				},
				{
					"firstName": "Fredy",
					"lastName": "Lesch",
					"roles": [
						"admin"
					]
				},
				{
					"firstName": "Earnest",
					"lastName": "Blick",
					"roles": [
						"owner"
					]
				},
			]
		}
	}
}
```

{% endtab %}

{% tab title="🔴 400" %}

```json
```

{% endtab %}
{% endtabs %}

### Try it out!

{% embed url="<https://studio.apollographql.com/sandbox/explorer?endpoint=https://api.inabit.app/graphql&explorerURLState=N4IgJg9gxgrgtgUwHYBcQC4QEcYIE4CeABAPJ4DmAhkgJYBelKNESAFACQDuAFvguqQrV6jZkgDqvPAgCqtHAgCSSAA4wUAQgCURYAB0kelBCG0GTFqx58BXKQh37DKI5XLIUAZ10GjflABmNHieKABylIi+LjEANpShEVHO-ngQsQie0UYAvtF5SDkgOUA>" %}

[^1]:


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.inabit.com/api-reference/develop-with-inabit-api/organizations/organization-users.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
