Dear AzureWebPubSub users, I was following this document to fetch the client access token for Azure WebPubSub and it returned me a JWT token and on decoding it was:-
{"alg": "HS256","kid": "s-5acf1aac-944d-43a6-b107-dcb529eb11fb","typ": "JWT"}.{"sub": "5753","nbf": 1707417893,"exp": 1707421493,"iat": 1707417893,"iss": "https://webpubsub.azure.com","aud": "https://<my-pubsub-instance>.webpubsub.azure.com/client/hubs/<hub_name>"}
I send POST request, url was:-
https://<my-pubsub-instance>.webpubsub.azure.com/api/hubs/<hub_name>/:generateToken?userId=5753&roles=webpubsub.joinLeaveGroup&api-version=2021-10-01
But when my client connects with the Azure WebPubSub Service, following are the messages/logs received on live trace tool
Request started.
Connection started
Received a message [260303712814104577] from client connection SCBwg74LmXFrl8tE-3xXqgmSET3gK02.
Failed to send message [260303712814104577]: The client does not have permission to join group 'Organization_1108'..
Could anyone please help me in resolving this issue? What wrong I am doing while generating the access token for the client?