# Information Required for Alarm Pipeline

**URL:** <https://forum.inductiveautomation.com/t/information-required-for-alarm-pipeline/111252>\
**Category:** Ignition\
**Created:** [October 7, 2025, 10:12pm UTC](https://forum.inductiveautomation.com/t/information-required-for-alarm-pipeline/111252 "2025-10-07T22:12:26Z")\
**Posts on this page:** 1\
**Showing post:** 5

<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:** [October 7, 2025, 11:48pm UTC](https://forum.inductiveautomation.com/t/information-required-for-alarm-pipeline/111252/5 "2025-10-07T23:48:56Z")

</div>

Some possible inspiration in this thread:

> [@Combing multiple rosters to a single roster](https://forum.inductiveautomation.com/t/combing-multiple-rosters-to-a-single-roster/71349/7):
>
> Your code has a lot of problems. Chiefly: You're not returning the contact infos as a list of possible contact infos You're not differentiating between SMS, email, or phone numbers, which you would want to do. You don't need to call system.user.getUser if you use system.roster.getRoster(), which directly returns User objects Hardcoding in default to the system.user.getUser function is also a bad idea. You're returning in the wrong format anyways: you're returning something like: [ { "Maint…

Basically you interrogate the user source using the system functions then build that up into a response.

Put together, something like this:

```python
def getUsersWithRole(userSource, role):
	return filter(
		lambda u: role in u.roles,
		system.user.getUsers(userSource)
	)

return [
	dict(
		username = user.get(user.Username),
		**{ci.contactType: ci.value for ci in user.contactInfo}
	)
	for user in getUsersWithRole("myUserSource", "administrator")
]

```

---

_[View the full topic](https://forum.inductiveautomation.com/t/information-required-for-alarm-pipeline/111252)._
