# Adding/Remove Users from a Roster Via Scripting

**URL:** <https://forum.inductiveautomation.com/t/adding-remove-users-from-a-roster-via-scripting/115306>\
**Category:** Ignition\
**Tags:** ignition83, scripting\
**Created:** [April 29, 2026, 2:56pm UTC](https://forum.inductiveautomation.com/t/adding-remove-users-from-a-roster-via-scripting/115306 "2026-04-29T14:56:53Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Zachary\_Kacel1](https://avatars.discourse-cdn.com/v4/letter/z/ea666f/32.png) [@Zachary\_Kacel1](https://forum.inductiveautomation.com/u/Zachary_Kacel1)\
**Post date:** [April 29, 2026, 2:56pm UTC](https://forum.inductiveautomation.com/t/adding-remove-users-from-a-roster-via-scripting/115306/1 "2026-04-29T14:56:53Z")

</div>

I am creating a custom roster manager and I ran into an issue where after I add or remove a user the roster doesn't update right away. It seems to take a few seconds to pick up the roster change. I didn't want the user to have to click a refresh after adding or removing a user so my solution was to put a invokeAsynchronous and a 2 second sleep timer before I fetch the updated roster. This seems to work every time.

1. Why doesn't the roster update right away
2. Is there a better way to do this

REMOVE BUTTON _user hardcoded for now_

```python
    import time
	
	#Disable Button so user can't click it twice
	self.view.custom.buttonsEnabled = False
	
	#Get user and roster name
	user = system.user.getUser('ActiveDirectory', 'USER')
	roster = self.view.params.Roster
	
	#Remove user from roster
	system.roster.removeUsers(roster, [user])
	
	#Added a delayed refresh because after adding or remove a user on a roster it takes a few seconds to pick up the change
	#Only using time.sleep because I am calling it Asynchronous
	def delay_refresh():
		time.sleep(2)
        #Get updated roster contains system.roster.getUsers(name)
		self.view.custom.roster = custom.roster.get(roster)
		self.view.custom.buttonsEnabled = True
		
	system.util.invokeAsynchronous(delay_refresh)

```

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/f/2/f2f943509d5b3476c78509d1649a06b7b330bfe9.png)

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [April 29, 2026, 3:55pm UTC](https://forum.inductiveautomation.com/t/adding-remove-users-from-a-roster-via-scripting/115306/2 "2026-04-29T15:55:17Z")

</div>

What version of Ignition are you using?

This should be fixed in 8.3.6.

---

<div class="post-metadata">

**Author:** ![Zachary\_Kacel1](https://avatars.discourse-cdn.com/v4/letter/z/ea666f/32.png) [@Zachary\_Kacel1](https://forum.inductiveautomation.com/u/Zachary_Kacel1)\
**Post date:** [April 29, 2026, 4:00pm UTC](https://forum.inductiveautomation.com/t/adding-remove-users-from-a-roster-via-scripting/115306/3 "2026-04-29T16:00:24Z")

</div>

We are on 8.3.3. Good to know it will be fixed on 8.3.6. I know our server admin was planning to upgrade soon.

Thanks,
