## Get User Claims

`client.Admin.Users.GetClaims(ctx, userID) (*UserClaims, error)`

**get** `/api/v1/admin/users/{user_id}/claims`

Get a user's resolved custom claims.

Claims that have not been explicitly set fall back to their system default. Returns 404 if the user does not exist.

Global admin only.

### Parameters

- `userID string`

### Returns

- `type UserClaims struct{…}`

  A user's fully resolved custom claims after applying system defaults.

  - `Claims CustomClaims`

    The user's resolved custom claims.

    - `AllowOrgDeletion bool`

      Whether the user is allowed to delete organizations.

    - `AllowedOrgCreation bool`

      Whether the user is allowed to create organizations.

    - `APIDatasourceAccess bool`

      Whether the user is allowed to access API data sources.

    - `MaximumOrgCreation int64`

      Cap on how many organizations this user may create. None means unlimited. Only enforced when allowed_org_creation is True.

  - `UserID string`

    The user ID the claims belong to.

### Example

```go
package main

import (
  "context"
  "fmt"

  "github.com/run-llama/llamacloud-admin-go"
  "github.com/run-llama/llamacloud-admin-go/option"
)

func main() {
  client := llamacloudadmin.NewClient(
    option.WithAPIKey("My API Key"),
  )
  userClaims, err := client.Admin.Users.GetClaims(context.TODO(), "user_id")
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", userClaims.UserID)
}
```

#### Response

```json
{
  "claims": {
    "allow_org_deletion": true,
    "allowed_org_creation": true,
    "api_datasource_access": true,
    "maximum_org_creation": 0
  },
  "user_id": "user_id"
}
```
