# auth.set_attribute

Set current user’s attributes dictionary key to value.

e.g. Setting key=”foo” value=”var” will result in {“attributes”: {“foo”: “bar”}}

Attributes set here will appear in the auth.me API response under the attributes field.

WARNING: this API endpoint exists solely for the use of the TrueNAS UX team. The data stored in these attributes must be considered opaque from the perspective of the middleware backend, with specific documented exceptions. This endpoint should not be used or relied on by any third-party scripts or workflows.

WARNING: this API endpoint is not intended for storing security-sensitive information. The backend storage for this data is not encrypted and it is indexed by unix user id rather than database ID, which exposes a risk of stale settings being reused if a new user gets assigned the same unix user id as an previously-existing one. This is of particular concern when users are provided by directory services.

Type: object

##

Type: array
No Additional Items

#### Tuple Validation

##### Parameter 1: key

#### key

Type: string

##### Parameter 2: value

#### value

Type: object

##

#### Result

Type: null

Required roles: