A user object represents an account in Asana that can be given access to various workspaces, projects, and tasks.
Like other objects in the system, users are referred to by numerical IDs. However, the special string identifier me
can be used anywhere a user ID is accepted, to refer to the current authenticated user (e.g, GET /users/me
).
UserCompact
Property | Type | Description |
---|---|---|
gid | string | Globally unique identifier of the resource, as a string. |
resource_type | string | The base type of this resource. |
name | string | Read-only except when same user as requester. The user's name. |
Example JSON for UserCompact
:
{
"gid": "12345",
"resource_type": "user",
"name": "Greg Sanchez"
}
User
Property | Type | Description |
---|---|---|
gid | string | Globally unique identifier of the resource, as a string. |
resource_type | string | The base type of this resource. |
name | string | Read-only except when same user as requester. The user's name. |
email | string (email) | The user's email address. |
photo | object | A map of the user's profile photo in various sizes, or null if no photo is set. Sizes provided are 21, 27, 36, 60, 128, and 1024. All images are in PNG format, except for 1024 (which is in JPEG format). |
photo.image_21x21 | string (uri) | PNG image of the user at 21x21 pixels. |
photo.image_27x27 | string (uri) | PNG image of the user at 27x27 pixels. |
photo.image_36x36 | string (uri) | PNG image of the user at 36x36 pixels. |
photo.image_60x60 | string (uri) | PNG image of the user at 60x60 pixels. |
photo.image_128x128 | string (uri) | PNG image of the user at 128x128 pixels. |
photo.image_1024x1024 | string (uri) | JPEG image of the user at 1024x1024 pixels. |
workspaces[] | [object] | Workspaces and organizations this user may access. Note: The API will only return workspaces and organizations that also contain the authenticated user. |
workspaces[].gid | string | Globally unique identifier of the resource, as a string. |
workspaces[].resource_type | string | The base type of this resource. |
workspaces[].name | string | The name of the workspace. |
custom_fields[] | [object] | Array of Custom Fields. |
custom_fields[].gid | string | Globally unique identifier of the resource, as a string. |
custom_fields[].resource_type | string | The base type of this resource. |
custom_fields[].name | string | The name of the custom field. |
custom_fields[].type | string | Deprecated: new integrations should prefer the resource_subtype field. The type of the custom field. Must be one of the given values. Click to show all enum values
|
custom_fields[].enum_options[] | [object] | Conditional. Only relevant for custom fields of type enum or multi_enum . This array specifies the possible values which an enum custom field can adopt. To modify the enum options, refer to working with enum options. |
custom_fields[].enum_options[].gid | string | Globally unique identifier of the resource, as a string. |
custom_fields[].enum_options[].resource_type | string | The base type of this resource. |
custom_fields[].enum_options[].name | string | The name of the enum option. |
custom_fields[].enum_options[].enabled | boolean | Whether or not the enum option is a selectable value for the custom field. |
custom_fields[].enum_options[].color | string | The color of the enum option. Defaults to none . |
custom_fields[].enabled | boolean | Conditional. Determines if the custom field is enabled or not. |
custom_fields[].representation_type | string | This field tells the type of the custom field. Click to show all enum values
|
custom_fields[].id_prefix | string | This field is the unique custom ID string for the custom field. |
custom_fields[].is_formula_field | boolean | Conditional. This flag describes whether a custom field is a formula custom field. |
custom_fields[].date_value | object | Conditional. Only relevant for custom fields of type date . This object reflects the chosen date (and optionally, time) value of a date custom field. If no date is selected, the value of date_value will be null . |
custom_fields[].date_value.date | string | A string representing the date in YYYY-MM-DD format. |
custom_fields[].date_value.date_time | string | A string representing the date in ISO 8601 format. If no time value is selected, the value of date-time will be null . |
custom_fields[].enum_value | object | Conditional. Only relevant for custom fields of type enum . This object is the chosen value of an enum custom field. |
custom_fields[].enum_value.gid | string | Globally unique identifier of the resource, as a string. |
custom_fields[].enum_value.resource_type | string | The base type of this resource. |
custom_fields[].enum_value.name | string | The name of the enum option. |
custom_fields[].enum_value.enabled | boolean | Whether or not the enum option is a selectable value for the custom field. |
custom_fields[].enum_value.color | string | The color of the enum option. Defaults to none . |
custom_fields[].multi_enum_values[] | [object] | Conditional. Only relevant for custom fields of type multi_enum . This object is the chosen values of a multi_enum custom field. |
custom_fields[].multi_enum_values[].gid | string | Globally unique identifier of the resource, as a string. |
custom_fields[].multi_enum_values[].resource_type | string | The base type of this resource. |
custom_fields[].multi_enum_values[].name | string | The name of the enum option. |
custom_fields[].multi_enum_values[].enabled | boolean | Whether or not the enum option is a selectable value for the custom field. |
custom_fields[].multi_enum_values[].color | string | The color of the enum option. Defaults to none . |
custom_fields[].number_value | number | Conditional. This number is the value of a number custom field. |
custom_fields[].text_value | string | Conditional. This string is the value of a text custom field. |
custom_fields[].display_value | string | A string representation for the value of the custom field. Integrations that don't require the underlying type should use this field to read values. Using this field will future-proof an app against new custom field types. |
Example JSON for User
:
{
"gid": "12345",
"resource_type": "user",
"name": "Greg Sanchez",
"email": "[email protected]",
"photo": {
"image_21x21": "https://...",
"image_27x27": "https://...",
"image_36x36": "https://...",
"image_60x60": "https://...",
"image_128x128": "https://...",
"image_1024x1024": "https://..."
},
"workspaces": [
{
"gid": "12345",
"resource_type": "workspace",
"name": "My Company Workspace"
}
],
"custom_fields": [
{
"gid": "12345",
"resource_type": "custom_field",
"name": "Status",
"type": "example string",
"enum_options": [
{
"gid": "12345",
"resource_type": "enum_option",
"name": "Low",
"enabled": true,
"color": "blue"
}
],
"enabled": true,
"representation_type": "number",
"id_prefix": "ID",
"is_formula_field": false,
"date_value": {
"date": "2024-08-23",
"date_time": "2024-08-23T22:00:00.000Z"
},
"enum_value": {
"gid": "12345",
"resource_type": "enum_option",
"name": "Low",
"enabled": true,
"color": "blue"
},
"multi_enum_values": [
{
"gid": "12345",
"resource_type": "enum_option",
"name": "Low",
"enabled": true,
"color": "blue"
}
],
"number_value": 5.2,
"text_value": "Some Value",
"display_value": "blue"
}
]
}