List Users in Account
GET
/user-accounts/account/{accountId}Get all users who have access to a specific account.
Returns each user along with their role(s) for that account. This is useful
for showing the team members in an account or building an account-level
permissions page.
When to use this
- Showing who can access a specific account
- Building team management interfaces
- Reviewing permissions before removing an account
Parameters
accountIdpathrequiredAccount ID
Response
Role assignments retrieved
Notes
💡Users can have multiple roles in the same account-check the roles array for each result.
Code Samples
List User Account Roles By Account using the TypeScript SDK:
import { BackstageClient } from '@ticketlayer/backstage';
const client = new BackstageClient({
organisationSlug: 'your-org',
});
client.setAccessToken('YOUR_ACCESS_TOKEN');
// List useraccountrolesbyaccount
const { useraccountrolesbyaccount, pagination } = await client.useraccountrolesbyaccount.list({
limit: 20,
page: 1,
});
for (const item of useraccountrolesbyaccount) {
console.log(`${item.id}: ${item.name || item.id}`);
}
console.log(`Page ${pagination.page} of ${pagination.totalPages}`);