# Implement audit logging for users and devices

**URL:** <https://forums.balena.io/t/implement-audit-logging-for-users-and-devices/373353>\
**Category:** Feature Requests\
**Tags:** balenacloud, building\
**Created:** [January 18, 2023, 10:56am UTC](https://forums.balena.io/t/implement-audit-logging-for-users-and-devices/373353 "2023-01-18T10:56:23Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/balena/original/2X/6/60e5c11e1222480d38bea45d7ab9ea57bbe86d53.png) [@system](https://forums.balena.io/u/system)\
**Post date:** [January 18, 2023, 10:56am UTC](https://forums.balena.io/t/implement-audit-logging-for-users-and-devices/373353/1 "2023-01-18T10:56:23Z")

</div>

Enable a means for changes to devices/fleets/apps to be logged so that it’s then possible to find out when a specific change was made and by whom.

---

<div class="post-metadata">

**Author:** ![anonymizeduser](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/anonymizeduser/32/10188_2.png) [@anonymizeduser](https://forums.balena.io/u/anonymizeduser)\
**Post date:** [February 13, 2023, 8:01pm UTC](https://forums.balena.io/t/implement-audit-logging-for-users-and-devices/373353/2 "2023-02-13T20:01:31Z")

</div>

It is also worked here? [Implement webhooks/notifications/a means to be alerted of changes · Balena Feature Requests](https://roadmap.balena.io/posts/10/implement-webhooks-notifications-a-means-to-be-alerted-of-changes)

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/balena/original/2X/6/60e5c11e1222480d38bea45d7ab9ea57bbe86d53.png) [@system](https://forums.balena.io/u/system)\
**Post date:** [February 14, 2023, 8:11am UTC](https://forums.balena.io/t/implement-audit-logging-for-users-and-devices/373353/3 "2023-02-14T08:11:30Z")

</div>

Chris Crocker-White: this project is more about logging the actions that were taken so there’s a history there that you can look back on to see what actions were taken, whereas the webhooks/notifications is more about informing other services in an automated way.

---

<div class="post-metadata">

**Author:** ![anonymizeduser](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/anonymizeduser/32/10188_2.png) [@anonymizeduser](https://forums.balena.io/u/anonymizeduser)\
**Post date:** [August 2, 2023, 12:04pm UTC](https://forums.balena.io/t/implement-audit-logging-for-users-and-devices/373353/4 "2023-08-02T12:04:22Z")

</div>

Is there a plan to implement this into the UI?

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/balena/original/2X/6/60e5c11e1222480d38bea45d7ab9ea57bbe86d53.png) [@system](https://forums.balena.io/u/system)\
**Post date:** [August 2, 2023, 1:09pm UTC](https://forums.balena.io/t/implement-audit-logging-for-users-and-devices/373353/5 "2023-08-02T13:09:17Z")

</div>

Harald (balena): Yes, the plan is to implement this into the balena dashboard. We are going to start with the device audit logs. Right now, we are remodelling the data structure to make it a seamless experience to browse through device audit logs. We’ll update on the progress here, once we have the feature shipped.

---

<div class="post-metadata">

**Author:** ![anonymizeduser](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/anonymizeduser/32/10188_2.png) [@anonymizeduser](https://forums.balena.io/u/anonymizeduser)\
**Post date:** [August 2, 2023, 1:10pm UTC](https://forums.balena.io/t/implement-audit-logging-for-users-and-devices/373353/6 "2023-08-02T13:10:58Z")

</div>

The provided example for filtered requests did not work for us in Postman. We used this instead:

[https://api.balena-cloud.com/v6/device\_history?$select=uuid,tracks\_\_device,is\_created\_by\_\_actor&$filter=uuid](https://api.balena-cloud.com/v6/device_history?$select=uuid,tracks __device,is_created_by__ actor&$filter=uuid) eq ‘ACTUAL\_UUID’&$expand=tracks\_\_device,is\_created\_by\_\_actor($expand=is\_of\_\_user)

Also, thanks for the update on audit logging. We are looking forward to it, because of ISO 27001.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/balena/original/2X/6/60e5c11e1222480d38bea45d7ab9ea57bbe86d53.png) [@system](https://forums.balena.io/u/system)\
**Post date:** [October 8, 2024, 10:22am UTC](https://forums.balena.io/t/implement-audit-logging-for-users-and-devices/373353/7 "2024-10-08T10:22:58Z")

</div>

Oct 2024  
As it’s been a while since we provided an update, we wanted to give you some background on what’s been happening with this work.

As Harald has detailed, we have since implemented device audit logs that can be accessed from the API. However, we recognise that this might not serve the functionality that’s actually being asked for here. From what we assume, this is for users to be able to see the history of the device e.g. who’s interacted with it, when it’s been powered on and off, connectivity history. etc

We’re moving this feature back to ‘open’ so we can go back to the planning stage and deliver functionality that our users need. To do this, we’d like to understand more about everyone’s use cases and what this is needed for. Our assumption is that this would be most valuable for security purposes, but we don’t want to build on assumptions! If you can share your use cases in the comments, we can collect your feedback and discuss the best way to move forward.

Thank you for your help in making balena better for everyone!

Aug 2023  
Our current plans are to expose our internal device histories first. This exposed resource will answer questions about ‘What happened to a device and who did it’.  
This device history will be visible per device and per fleet through the dashboard. In addition, the information will also be queryable a a regular balenaAPI resource.  
Currently we are finalising the exposure of the resource and afterwards start the dashboard integration.

Update:

This week we have released the functionality in our API to request the device history for all accessible devices.  
The API provides the `device_history` resource which is filterable for example by an device UUID. The interface for the device\_history record is:

```auto
DeviceHistory {
    created_at: DateString;
    modified_at: DateString;
    id: number;
    end_timestamp: DateString | null;
    is_created_by __actor: {__ id: number } | [Actor?] | null;
    is_ended_by __actor: {__ id: number } | [Actor?] | null;
    tracks __device: {__ id: number } | [Device?] | null;
    tracks __actor: {__ id: number } | [Actor?] | null;
    uuid: string | null;
    belongs_to __application: {__ id: number } | [Application?] | null;
    is_active: boolean;
    is_running __release: {__ id: number } | [Release?] | null;
    should_be_running __release: {__ id: number } | [Release?] | null;
    api_heartbeat_state: 'online' | 'offline' | 'timeout' | 'unknown';
    is_connected_to_vpn: boolean;
    is_managed_by __service_instance: {__ id: number } | [ServiceInstance?] | null;
    os_version: string | null;
    os_variant: string | null;
    supervisor_version: string | null;
    is_of __device_type: {__ id: number } | [DeviceType?] | null;
    cpu_id: string | null;
    should_be_managed_by __release: {__ id: number } | [Release?] | null;
}

```

An example query for getting all visible device history records and user who caused the history entry (the user who made the change) is:

```auto
https://api.balena-cloud.com/v6/device_history?$select=uuid,tracks __device,is_created_by__ actor&$expand=tracks __device,is_created_by__ actor($expand=is_of__user)

```

Filtered by UUID:

```auto
https://api.balena-cloud.com/v6/device_history?$select=uuid,tracks __device,is_created_by__ actor&$filter=uuid eq '<uuid>'&$expand=tracks __device,is_created_by__ actor($expand=is_of__user)

```

The device history visibility is provided with plan specific look-back timeframes:

- for the Free, Pilot and Prototype plans the history shows all entries from the last 24 hours.
- for the Production plan the history shows all entries from the last 30 days.
- for the Enterprise plan the history shows all entries from the last 90 days

Our next step is the surfacing on the balenaDashboard.

---

<div class="post-metadata">

**Author:** ![anonymizeduser](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/anonymizeduser/32/10188_2.png) [@anonymizeduser](https://forums.balena.io/u/anonymizeduser)\
**Post date:** [October 8, 2024, 12:59pm UTC](https://forums.balena.io/t/implement-audit-logging-for-users-and-devices/373353/8 "2024-10-08T12:59:51Z")

</div>

Replying to the update from Laura, we have two uses cases:

1. Internal audit. When responding to an incident, we can check if and when something was changed. For example, we store some of the application configuration in the device env variables and it would be convenient to access the device history from the dashboard, rather than executing an API call on demand, or setting up a script that dumps all the device events periodically.
2. External audit. Some clients have previously requested logs of the changes done to their devices. We addressed this with the existing API call. However, without involving the tech team, it would be either that we assign an observer user to a fleet and then the client gathers the information they need autonomously, or we should be able to export the logs in csv or comparable format and send to the client on request.

---

<div class="post-metadata">

**Author:** ![Jazzagi](https://avatars.discourse-cdn.com/v4/letter/j/9de0a6/32.png) [@Jazzagi](https://forums.balena.io/u/Jazzagi)\
**Post date:** [February 25, 2025, 10:29am UTC](https://forums.balena.io/t/implement-audit-logging-for-users-and-devices/373353/10 "2025-02-25T10:29:06Z")

</div>

Update: We’re actively working on the specification of the first iteration of a solution for audit logging. We’ll keep you updated.

---

<div class="post-metadata">

**Author:** ![karmingc](https://avatars.discourse-cdn.com/v4/letter/k/ac8455/32.png) [@karmingc](https://forums.balena.io/u/karmingc)\
**Post date:** [February 25, 2025, 2:28pm UTC](https://forums.balena.io/t/implement-audit-logging-for-users-and-devices/373353/11 "2025-02-25T14:28:16Z")

</div>

Thanks. Our team is very interested in this feature.

---

<div class="post-metadata">

**Author:** ![keith-instore.ai](https://avatars.discourse-cdn.com/v4/letter/k/bc79bd/32.png) [@keith-instore.ai](https://forums.balena.io/u/keith-instore.ai)\
**Post date:** [May 6, 2025, 3:02pm UTC](https://forums.balena.io/t/implement-audit-logging-for-users-and-devices/373353/13 "2025-05-06T15:02:20Z")

</div>

Our company is growing quickly, we will have many users and thousands of devices soon. We desperately need a way to audit how are users are using the API and Website for SOCII and PCI audits. Our minimum feature would be simply last login, but more comprehensive audit logging will be very useful. It would also be useful to have API access to these logs for automation, but not as immediately needed

---

<div class="post-metadata">

**Author:** ![mm-andrew](https://avatars.discourse-cdn.com/v4/letter/m/73ab20/32.png) [@mm-andrew](https://forums.balena.io/u/mm-andrew)\
**Post date:** [December 1, 2025, 5:07pm UTC](https://forums.balena.io/t/implement-audit-logging-for-users-and-devices/373353/14 "2025-12-01T17:07:08Z")

</div>

This is also a capability our team requires. Took a look at the history API endpoint but it does not cover our compliance requirements.

I would like to see logs on who did what when in both Balena and on the device itself (or just when someone auths)

---

<div class="post-metadata">

**Author:** ![samuel-duffield1](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/samuel-duffield1/32/10378_2.png) [@samuel-duffield1](https://forums.balena.io/u/samuel-duffield1)\
**Post date:** [December 4, 2025, 10:15am UTC](https://forums.balena.io/t/implement-audit-logging-for-users-and-devices/373353/15 "2025-12-04T10:15:21Z")

</div>

Hi @mm-andrew,

Thanks for reaching out!

We have some exciting developments in this area, we are currently working on the balena-user-audit-logging feature, and have it on our roadmap to release next year.

We’ll be looking for candidates for a private trial for this feature. If you’re interested, please drop a comment on this thread!

---

<div class="post-metadata">

**Author:** ![mm-andrew](https://avatars.discourse-cdn.com/v4/letter/m/73ab20/32.png) [@mm-andrew](https://forums.balena.io/u/mm-andrew)\
**Post date:** [December 4, 2025, 2:12pm UTC](https://forums.balena.io/t/implement-audit-logging-for-users-and-devices/373353/17 "2025-12-04T14:12:59Z")

</div>

That would be great, we would definitely be interested to help trial the feature.

---

<div class="post-metadata">

**Author:** ![delicious](https://avatars.discourse-cdn.com/v4/letter/d/dbc845/32.png) [@delicious](https://forums.balena.io/u/delicious)\
**Post date:** [January 6, 2026, 2:18pm UTC](https://forums.balena.io/t/implement-audit-logging-for-users-and-devices/373353/18 "2026-01-06T14:18:10Z")

</div>

Hey all! Happy to trial this feature as well 🙂

---

<div class="post-metadata">

**Author:** ![matson](https://avatars.discourse-cdn.com/v4/letter/m/e0b2c6/32.png) [@matson](https://forums.balena.io/u/matson)\
**Post date:** [April 22, 2026, 12:44pm UTC](https://forums.balena.io/t/implement-audit-logging-for-users-and-devices/373353/19 "2026-04-22T12:44:32Z")

</div>

Hi! We would be interested in a private trial for this feature! Thank you

---

<div class="post-metadata">

**Author:** ![winston](https://avatars.discourse-cdn.com/v4/letter/w/e8c25b/32.png) [@winston](https://forums.balena.io/u/winston)\
**Post date:** [September 28, 2026, 1:10pm UTC](https://forums.balena.io/t/implement-audit-logging-for-users-and-devices/373353/20 "2026-09-28T13:10:06Z")

</div>

Hello. We are interested in being able to audit activity on member accounts. Is there an estimate on when will this feature be made available? Thank you
