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 :doc:`auth.me ` response under the ``attributes`` field. .. important:: This 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 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 a previously-existing one. This is of particular concern when users are provided by directory services. .. raw:: html
Type: object

Type: array
No Additional Items

Tuple Validation

Parameter 1: key

key

Type: string

Attribute key name.

Parameter 2: value

value

Type: object

Attribute value to set.

Result

Type: null

Returns null when the attribute is successfully set.



*Required roles:*