# Get active users on a Table, OKTA IdP

**URL:** <https://forum.inductiveautomation.com/t/get-active-users-on-a-table-okta-idp/106215>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [May 13, 2025, 6:59pm UTC](https://forum.inductiveautomation.com/t/get-active-users-on-a-table-okta-idp/106215 "2025-05-13T18:59:59Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ramiro\_Ramirez](https://avatars.discourse-cdn.com/v4/letter/r/e9a140/32.png) [@Ramiro\_Ramirez](https://forum.inductiveautomation.com/u/Ramiro_Ramirez)\
**Post date:** [May 13, 2025, 6:59pm UTC](https://forum.inductiveautomation.com/t/get-active-users-on-a-table-okta-idp/106215/1 "2025-05-13T18:59:59Z")

</div>

Hi everyone,

I'm trying to get the active users on a table but I'm able to get only their usernames with a for loop and getSessionInfo() function. I can read the full name (First and Last name) in the Test Login/Mapped User Attributes.

How can I get their full names instead of usernames on the table?

---

<div class="post-metadata">

**Author:** ![MMaynard](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mmaynard/32/3366_2.png) [@MMaynard](https://forum.inductiveautomation.com/u/MMaynard)\
**Post date:** [May 13, 2025, 8:05pm UTC](https://forum.inductiveautomation.com/t/get-active-users-on-a-table-okta-idp/106215/2 "2025-05-13T20:05:05Z")

</div>

You can call out to system.user.getUser() to gather that information

```python
	sessionInfo = system.perspective.getSessionInfo(projectFilter="YourProjectNameHere")
	for index, sessionObj in enumerate(sessionInfo):
	    uInfo = system.user.getUser('', sessionObj["username"])
	    system.perspective.print(uInfo.get('lastname'))
	    system.perspective.print(uInfo.get('firstname'))

```

---

<div class="post-metadata">

**Author:** ![Ramiro\_Ramirez](https://avatars.discourse-cdn.com/v4/letter/r/e9a140/32.png) [@Ramiro\_Ramirez](https://forum.inductiveautomation.com/u/Ramiro_Ramirez)\
**Post date:** [May 13, 2025, 9:43pm UTC](https://forum.inductiveautomation.com/t/get-active-users-on-a-table-okta-idp/106215/3 "2025-05-13T21:43:36Z")

</div>

> [@MMaynard](#):
>
> ```python
> sessionInfo = system.perspective.getSessionInfo(projectFilter="YourProjectNameHere")
> for index, sessionObj in enumerate(sessionInfo):
> uInfo = system.user.getUser('', sessionObj["username"])
> system.perspective.print(uInfo.get('lastname'))
> system.perspective.print(uInfo.get('firstname'))
> 
> ```

Hi MMaynard,

I'm getting this error:

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/8/c/8cfae0376e5cec964cfa58fa35f7a2cf10c8067f.png)

I'm using OKTA Authentication

---

<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:** [May 13, 2025, 10:50pm UTC](https://forum.inductiveautomation.com/t/get-active-users-on-a-table-okta-idp/106215/4 "2025-05-13T22:50:17Z")

</div>

> [@Ramiro\_Ramirez](#):
>
> I'm using OKTA Authentication

Authentication providers shouldn't change this data, the user sessions should be stored the same way regardless of IdP.

---

<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:** [May 13, 2025, 10:53pm UTC](https://forum.inductiveautomation.com/t/get-active-users-on-a-table-okta-idp/106215/5 "2025-05-13T22:53:25Z")

</div>

> [@MMaynard](#):
>
> `system.user.getUser(`

This only works with user sources, not with Identity Providers.
