List User-Account Roles
GET
/user-accountsGet all user-account-role assignments across your organisation.
This shows the complete picture of who has access to what. Each result
includes the user, the account they have access to, and which role(s) they
hold for that account.
Useful for auditing permissions or building admin interfaces.
When to use this
- Auditing who has access to which accounts
- Building a permissions management dashboard
- Exporting access lists for compliance
Response
Role assignments retrieved successfully
Notes
ℹ️Returns all assignments-use filters to narrow down results for specific users or accounts.
💡For a simpler view, try listUserAccountRolesByUser or listUserAccountRolesByAccount.
Code Samples
List User Account Roles using the TypeScript SDK:
import { BackstageClient } from '@ticketlayer/backstage';
const client = new BackstageClient({
organisationSlug: 'your-org',
});
client.setAccessToken('YOUR_ACCESS_TOKEN');
// List useraccountroles
const { useraccountroles, pagination } = await client.useraccountroles.list({
limit: 20,
page: 1,
});
for (const item of useraccountroles) {
console.log(`${item.id}: ${item.name || item.id}`);
}
console.log(`Page ${pagination.page} of ${pagination.totalPages}`);