# Get all other participants within Canton script?

**URL:** <https://forum.canton.network/t/get-all-other-participants-within-canton-script/7426>\
**Category:** App Development\
**Tags:** canton\
**Created:** [October 2, 2024, 2:42pm UTC](https://forum.canton.network/t/get-all-other-participants-within-canton-script/7426 "2024-10-02T14:42:19Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![WallaceKelly](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/wallacekelly/32/5046_2.png) [@WallaceKelly](https://forum.canton.network/u/WallaceKelly)\
**Post date:** [October 2, 2024, 2:42pm UTC](https://forum.canton.network/t/get-all-other-participants-within-canton-script/7426/1 "2024-10-02T14:42:19Z")

</div>

Suppose you don’t have all the remote participants listed in your Canton configuration.

What is the best way to get a list of the other participants connected to a domain from within a Canton (bootstrap) script?

---

<div class="post-metadata">

**Author:** ![WallaceKelly](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/wallacekelly/32/5046_2.png) [@WallaceKelly](https://forum.canton.network/u/WallaceKelly)\
**Post date:** [October 2, 2024, 2:42pm UTC](https://forum.canton.network/t/get-all-other-participants-within-canton-script/7426/2 "2024-10-02T14:42:25Z")

</div>

Here is what I have. Am I overlooking a better way?

```haskell
val otherNodes = participant1.parties
  .list()
  .flatMap(_.participants.map(_.participant))
  .filter(_ != participant1.id)
  .distinct

```

HT: @Andrae for his Scala tips!
