How can I enable Shared Screen for Moderators using JWT?

I have Jitsi Meet with JWT tokens enabled and working.
Everything is great except Shared Screen (Desktop) functionality for moderators is disabled.

If I set “enableFeaturesBasedOnToken: false;” in the config file, shared screen works for all users as expected.

If I set “enableFeaturesBasedOnToken: true”

Guest are shown, “Guest can’t share share” (which is expected)
Moderator is shown " Share Screen Disabled" (not expected)

How can I enable shared screen to work for moderators only with enableFeaturesBasedOnToken: true?

I did the quick install + JWT setup +

My versions

ii jitsi-meet 2.0.5142-1
ii jitsi-meet-prosody 1.0.4466-1
ii jitsi-meet-turnserver 1.0.4466-1
ii jitsi-meet-web 1.0.4466-1
ii jitsi-meet-web-config 1.0.4466-1
ii jitsi-videobridge2 2.1-376-g9f12bfe2-1

Have you added in jwt token the feature ‘screen-sharing’?

Thank you for quick reply.

Do you mean on the token itself? I just tried the following

“room”: “*”,
“screen-sharing”: true,
“moderator”: true

Unfortunately, I’m still seeing the Share Screen Disabled message for the moderator.

Does screen-sharing’ need to go somewhere else?

Nope, that should be in

"context": {
    "features": {
        “screen-sharing”: true

Thanks, Damencho.

I tried that too. Unfortunately, that still didn’t work. I tried a hard refresh just incase, but it’s still showing “Share Screen Disabled”.

Here’s the full JWT payload.

“context”: {
“name”: “Moderator”
“features”: {
“screen-sharing”: true
“aud”: “xxxxxxx”,
“iss”: “xxxxxxxx”,
“sub”: “xxxxxxxx”,
“room”: “*”,
“moderator”: true

With the token, I’m able to start the meeting, mute all users, kick a user out, etc… It’s only Share Screen that is disabled.

Am I still structuring the token wrong for “screen-sharing”?

I checked the following page and few others but didn’t see anything regarding features and tokens:

Yeah that had not been used a lot … and no docs for this feature … Need to test it and debug js why it does not respect it …

Thanks. I really appreciate it. If you need anything, please let me know.

users” should be “user

screen-sharing” works for me.

  • the latest stable
  • the token content (screen-sharing) is same with your example
  • I didn’t test with token_moderation, I have token_affiliation

Thanks, Emrah.

Odd, I tried your script too… I’m still getting the disabled message for shared desktop.

Do you have the following in your config?

enableUserRolesBasedOnToken: true,
enableFeaturesBasedOnToken: true,

yes, both of them are true

This is a working token

  "aud": "myapp",
  "iss": "myapp",
  "sub": "",
  "exp": 1604566635,
  "room": "test-1234",
  "context": {
    "user": {
      "name": "myname",
      "email": "",
      "avatar": "",
      "affiliation": "owner"
    "features": {
      "recording": true,
      "livestreaming": true,
      "screen-sharing": true

and the link
1 Like

There may be a browser issue too. Try private window or incognito window

1 Like


Emrah, you were correct… it was the “users” in the token then a hard refresh to clear my cache.
Everything works now.

Thank you for your help.

1 Like

Emrah, have you find features options somewhere?
I want to activate or disable other features but I don’t find any list to know which features I can edit.


For the future readers, discussed here

1 Like