# How to Capture Device Type (Mobile/Desktop) in Audit Log for Perspective Sessions with Azure AD SSO

**URL:** <https://forum.inductiveautomation.com/t/how-to-capture-device-type-mobile-desktop-in-audit-log-for-perspective-sessions-with-azure-ad-sso/116135>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [June 24, 2026, 4:05pm UTC](https://forum.inductiveautomation.com/t/how-to-capture-device-type-mobile-desktop-in-audit-log-for-perspective-sessions-with-azure-ad-sso/116135 "2026-06-24T16:05:25Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![prasoon](https://avatars.discourse-cdn.com/v4/letter/p/ecb155/32.png) [@prasoon](https://forum.inductiveautomation.com/u/prasoon)\
**Post date:** [June 24, 2026, 4:05pm UTC](https://forum.inductiveautomation.com/t/how-to-capture-device-type-mobile-desktop-in-audit-log-for-perspective-sessions-with-azure-ad-sso/116135/1 "2026-06-24T16:05:25Z")

</div>

We are running a multi-plant SCADA project on Ignition Perspective with Azure AD SSO authentication. We have an existing audit table `idaa_t_audit_event` that is populated automatically by Ignition's built-in audit profile whenever a user logs in or out. The table structure is as follows:

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/4/3/43e334c3a9084291be8ac47f5b7bfa78842c4da4.png)

Ignition's built-in audit profile inserts a row with `action = 'login'` automatically on every session start. However, it does **not** populate the `device_type` column — that column was added by us manually via `ALTER TABLE`.

We want to know **from which device type** (mobile app / desktop browser) each user opened their Perspective session, and store that in the `device_type` column of `idaa_t_audit_event` against their login row.

How can I do it? Any guidance from the community would be greatly appreciated. Thank you!

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [June 24, 2026, 7:50pm UTC](https://forum.inductiveautomation.com/t/how-to-capture-device-type-mobile-desktop-in-audit-log-for-perspective-sessions-with-azure-ad-sso/116135/2 "2026-06-24T19:50:34Z")

</div>

Not sure you can. But you can use a session startup event that extracts the desired information from session props and calls [system.util.audit()](https://www.docs.inductiveautomation.com/docs/8.3/appendix/scripting-functions/system-util/system-util-audit) with customized action, action\_target, and/or action\_value.

---

<div class="post-metadata">

**Author:** ![prasoon](https://avatars.discourse-cdn.com/v4/letter/p/ecb155/32.png) [@prasoon](https://forum.inductiveautomation.com/u/prasoon)\
**Post date:** [June 25, 2026, 3:37am UTC](https://forum.inductiveautomation.com/t/how-to-capture-device-type-mobile-desktop-in-audit-log-for-perspective-sessions-with-azure-ad-sso/116135/3 "2026-06-25T03:37:07Z")

</div>

Thanks pturmel.

---

<div class="post-metadata">

**Author:** ![prasoon](https://avatars.discourse-cdn.com/v4/letter/p/ecb155/32.png) [@prasoon](https://forum.inductiveautomation.com/u/prasoon)\
**Post date:** [June 25, 2026, 3:38am UTC](https://forum.inductiveautomation.com/t/how-to-capture-device-type-mobile-desktop-in-audit-log-for-perspective-sessions-with-azure-ad-sso/116135/4 "2026-06-25T03:38:16Z")

</div>

Also we want to track the pages accessed by the user :  
We want to track **which pages a user visits during a session** , including:

- The page path navigated to

- The actor (username)

- Timestamp of the visit

---

<div class="post-metadata">

**Author:** ![David\_Stone](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/david_stone/32/79749_2.png) [@David\_Stone](https://forum.inductiveautomation.com/u/David_Stone)\
**Post date:** [June 25, 2026, 3:40am UTC](https://forum.inductiveautomation.com/t/how-to-capture-device-type-mobile-desktop-in-audit-log-for-perspective-sessions-with-azure-ad-sso/116135/5 "2026-06-25T03:40:26Z")

</div>

Make a page onLoad() function that messages it to the gateway with the user and session details then audit log that message.

---

<div class="post-metadata">

**Author:** ![prasoon](https://avatars.discourse-cdn.com/v4/letter/p/ecb155/32.png) [@prasoon](https://forum.inductiveautomation.com/u/prasoon)\
**Post date:** [June 25, 2026, 3:45am UTC](https://forum.inductiveautomation.com/t/how-to-capture-device-type-mobile-desktop-in-audit-log-for-perspective-sessions-with-azure-ad-sso/116135/6 "2026-06-25T03:45:25Z")

</div>

Can you please elaborate on that, it would be helpful. Thanks.

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [June 25, 2026, 7:51am UTC](https://forum.inductiveautomation.com/t/how-to-capture-device-type-mobile-desktop-in-audit-log-for-perspective-sessions-with-azure-ad-sso/116135/7 "2026-06-25T07:51:39Z")

</div>

I would rather add a custom prop to the header bound to the primaryView, and call the audit system function on change of that. Otherwise you're having to add a something to every main page

---

<div class="post-metadata">

**Author:** ![prasoon](https://avatars.discourse-cdn.com/v4/letter/p/ecb155/32.png) [@prasoon](https://forum.inductiveautomation.com/u/prasoon)\
**Post date:** [June 25, 2026, 9:10am UTC](https://forum.inductiveautomation.com/t/how-to-capture-device-type-mobile-desktop-in-audit-log-for-perspective-sessions-with-azure-ad-sso/116135/8 "2026-06-25T09:10:34Z")

</div>

Thanks nminchin.
