Azure Signalr Serverless Managment SDK Send to group does not work

Viewed 121

I am using azure signalr serverless mode with Management SDK and have REST Api wrapper to integrate with my other application.

I can broadcast messages to all clients but struggling with sending to specific group. I am Negotiating like this

`ServiceHubContext.NegotiateAsync(new NegotiationOptions() { UserId = _userId, Claims = new[] {
                    new Claim(ClaimTypes.NameIdentifier, _userId),
                    new Claim(ClaimTypes.Name, _userId),    
                }`

and adding user to group

 ServiceHubContext.UserGroups.AddToGroupAsync(_userId, GroupName);

and sending message to group

ServiceHubContext.Clients.Group(GroupName).SendAsync("locked", lockModel)

But message is still received by all users.

I also tried to add connectionId to specific group but still does not work. please note Rest Api does not have any authentication implemented.

I am hanging from last 2 month on this issue and unable to get any workaround for serverless mode. please help

0 Answers
Related