# How to get account through deviceID at server runtime

**URL:** <https://forum.heroiclabs.com/t/how-to-get-account-through-deviceid-at-server-runtime/4866>\
**Category:** Runtime Framework\
**Created:** [January 13, 2024, 5:43am UTC](https://forum.heroiclabs.com/t/how-to-get-account-through-deviceid-at-server-runtime/4866 "2024-01-13T05:43:36Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![suraxiuxiu](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.heroiclabs.com/suraxiuxiu/32/1736_2.png) [@suraxiuxiu](https://forum.heroiclabs.com/u/suraxiuxiu)\
**Post date:** [January 13, 2024, 5:43am UTC](https://forum.heroiclabs.com/t/how-to-get-account-through-deviceid-at-server-runtime/4866/1 "2024-01-13T05:43:36Z")

</div>

Is there a way for the typescript runtime to get account by deviceID like the Nakama Console account filter?  
Additionally, if I want to delete all accounts, how should I operate quickly?  
Thanks

---

<div class="post-metadata">

**Author:** ![suraxiuxiu](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.heroiclabs.com/suraxiuxiu/32/1736_2.png) [@suraxiuxiu](https://forum.heroiclabs.com/u/suraxiuxiu)\
**Post date:** [January 20, 2024, 12:11pm UTC](https://forum.heroiclabs.com/t/how-to-get-account-through-deviceid-at-server-runtime/4866/2 "2024-01-20T12:11:48Z")

</div>

Can anyone help me?

---

<div class="post-metadata">

**Author:** ![gbarnovi](https://avatars.discourse-cdn.com/v4/letter/g/d26b3c/32.png) [@gbarnovi](https://forum.heroiclabs.com/u/gbarnovi)\
**Post date:** [January 22, 2024, 11:46am UTC](https://forum.heroiclabs.com/t/how-to-get-account-through-deviceid-at-server-runtime/4866/3 "2024-01-22T11:46:46Z")

</div>

Hello,  
I think there is no such functionality in Runtime, one possible solution is to write custom SQL code to fetch user by deviceID.

Regarding deleting all the users and their data, possibly the easiest solution would be to run an SQL query for that too.
