# System.security.logout inquiry

**URL:** <https://forum.inductiveautomation.com/t/system-security-logout-inquiry/10652>\
**Category:** Ignition\
**Created:** [October 22, 2015, 4:44pm UTC](https://forum.inductiveautomation.com/t/system-security-logout-inquiry/10652 "2015-10-22T16:44:41Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![keith.crenshaw](https://avatars.discourse-cdn.com/v4/letter/k/fbc32d/32.png) [@keith.crenshaw](https://forum.inductiveautomation.com/u/keith.crenshaw)\
**Post date:** [October 22, 2015, 4:44pm UTC](https://forum.inductiveautomation.com/t/system-security-logout-inquiry/10652/1 "2015-10-22T16:44:41Z")

</div>

Hello,

```
 I am relatively new to working with Ignition. I have implemented an automatic logout feature using system.security.logout(), but would like to exclude a certain role from being logged out. I have seen some other threads on this, but I am not sure they will work the same as our client is using Active Directory. Can someone please advise on the simplest and best way to accomplish this? Thanks!
```

---

<div class="post-metadata">

**Author:** ![JordanCClark](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jordancclark/32/83362_2.png) [@JordanCClark](https://forum.inductiveautomation.com/u/JordanCClark)\
**Post date:** [October 22, 2015, 8:15pm UTC](https://forum.inductiveautomation.com/t/system-security-logout-inquiry/10652/2 "2015-10-22T20:15:55Z")

</div>

Hi, Keith. Welcome to the forums!

There are a couple of different ways to get a list of a user’s role.

One uses the RolesString tag.

`roles = system.tag.read('[System]Client/User/RolesString').value.split(',')
if "lookupRole" in roles and system.util.getInactivitySeconds() > 600: #Check for 10min. inactivity
    system.security.logout()`

Another uses a couple of different scripting functions:

`roles = system.user.getUser("",system.security.getUsername()).getRoles()
if "lookupRole" in roles and system.util.getInactivitySeconds() > 600: #Check for 10min. inactivity
    system.security.logout()
`

Either way will get you there. It’s really just a matter of preference. Or what makes more sense to you. 🙂

---

<div class="post-metadata">

**Author:** ![keith.crenshaw](https://avatars.discourse-cdn.com/v4/letter/k/fbc32d/32.png) [@keith.crenshaw](https://forum.inductiveautomation.com/u/keith.crenshaw)\
**Post date:** [October 23, 2015, 7:35pm UTC](https://forum.inductiveautomation.com/t/system-security-logout-inquiry/10652/3 "2015-10-23T19:35:00Z")

</div>

Thank you Jordan.
