Fetch a List of users in a WebApp
Hello Zitadel Team! 👋
I am using a Self-Hosted instance of Zitadel and I was wondering If I could possibly fetch a list of all available users in the Organization so a possible function like: Dropdown to choose a user responsible for something or whatever.
I am trying this:
https://zitadel.com/docs/apis/resources/user_service_v2/user-service-list-users
but it needs a bearer token, thing is, why should I use the logged user one? is it possible to make a global token or something to achieve this? is there a different way?
ZITADEL Docs
Search for users. By default, we will return all users of your instance that you have permission to read. Make sure to include a limit and sorting for pagination.
19 Replies
Unknown User•6mo ago
Message Not Public
Sign In & Join Server To View
Right so, i need you to hang on with me for a sec, User Token? where do I find that? this is my Service user correct?

Unknown User•6mo ago
Message Not Public
Sign In & Join Server To View
You mean Personal Access Token? I have generated one already and I am trying to use it

Oh
Unknown User•6mo ago
Message Not Public
Sign In & Join Server To View
Okay yes, I do not get the IAM role part, the role does not seem to pre-exist do I have to make such role?
Because the token worked, Now I am getting membership not found, I am assuming it has to do with the IAM role
Unknown User•6mo ago
Message Not Public
Sign In & Join Server To View
https://zitadel.com/docs/guides/integrate/service-users/personal-access-token#grant-role-for-zitadel
I think you are missing this
Unknown User•6mo ago
Message Not Public
Sign In & Join Server To View
Oh my god
You are a legend!
Thank you so much!
yes, the whole page describes what you both are talking 😄
Oh my god hahahaha I dont know how I missed that
But flo was here to save the day
Unknown User•6mo ago
Message Not Public
Sign In & Join Server To View
Appreciate the energy put!
Unknown User•6mo ago
Message Not Public
Sign In & Join Server To View
100 thanks to your giga brain
You can set this as resolved/solved Tag!
you can auto close it by marking the right answer with ✅
🎉 Looks like you just helped out another community member! Thanks for being so helpful <@1116318722664177744>! You're now one step closer to leveling up—keep up the amazing peer support! 🚀