Emitted when a role of a user changes. This can be useful if you have a custom participants panel and want to display up-to-date roles or you just want to react to a role change.

Sample payload

"type": "roleChanged",
"data": {
"userId": "2775f882-845e-4416-82c9-04cc25669c0b",
"from": "attendee",
"to": "moderator"

Sample subscription code

sambaFrame.on('roleChanged', (event) => {
const data =;
console.log('User', data.userId, 'role changed from', data.from, 'to',;
This event is often used with the changeRole method.