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

# Manage Users

> Learn how to fetch and list users.

export const HowToSchema = ({name, description, steps = []}) => {
  const schema = {
    "@context": "https://schema.org",
    "@type": "HowTo",
    name,
    description
  };
  if (steps.length > 0) {
    schema.step = steps.map((s, i) => ({
      "@type": "HowToStep",
      position: i + 1,
      name: typeof s === "string" ? s : s.name,
      text: typeof s === "string" ? s : s.text || s.name
    }));
  }
  return <script type="application/ld+json" dangerouslySetInnerHTML={{
    __html: JSON.stringify(schema)
  }} />;
};

<HowToSchema
  name="Manage Users"
  description="Learn how to fetch and list users."
  steps={[
{
  name: "Get a User",
  text: "You can get a user by passing the name of the user to the following endpoint. Response:",
},
{
  name: "List Users",
  text: "You can list all users in the organization using the following endpoint. Response:",
},
]}
/>

Confidence has endpoints for fetching and listing users that are part of your Confidence organization.

## Get a User

You can get a user by passing the name of the user to the following endpoint.

```bash theme={null}
curl -X GET "https://iam.confidence.dev/v1/users/xa8cecs2cc9xsz8jvgmc" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"
```

Response:

```json theme={null}
{
  "name": "users/xa8cecs2cc9xsz8jvgmc",
  "fullName": "John Doe",
  "email": "johndoe@confidence.dev",
  "pictureUri": "https://lh3.googleusercontent.com/a/AAcHTtxy1zIWynFKa3DWtaQAy4VAXOMnIj0SBwwzviO05YTvpD=s96-c",
  "blocked": false,
  "labels": {},
  "lastLoginTime": "2023-08-29T08:48:16.266Z",
  "createTime": "2022-12-08T12:12:58.332Z",
  "updateTime": "2023-08-29T08:48:16.266Z"
}
```

## List Users

You can list all users in the organization using the following endpoint.

```bash theme={null}
curl -X GET "https://iam.confidence.dev/v1/users" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"
```

Response:

```json theme={null}
{
  "users": [
    {
      "name": "users/xa8cecs2cc9xsz8jvgmc",
      "fullName": "John Doe",
      "email": "johndoe@confidence.dev",
      "pictureUri": "https://lh3.googleusercontent.com/a/AAcHTtxy1zIWynFKa3DWtaQAy4VAXOMnIj0SBwwzviO05YTvpD=s96-c",
      "blocked": false,
      "labels": {},
      "lastLoginTime": "2023-08-29T08:48:16.266Z",
      "createTime": "2022-12-08T12:12:58.332Z",
      "updateTime": "2023-08-29T08:48:16.266Z"
    }
  ],
  "nextPageToken": "MjAyMy0wOC0yNCAxMjo1OToyMy4wMjcwMDBVVEMsZ29vZ2xlLW9hdXRoMnwxMDQzMTQwODE5OTM2Mjk5NjgyNDE"
}
```
