Custom OAuth Provider, Merge Groups/Roles not working

Description

Hello, we setup a custom OAuth provider to allow users to login into Rocket.Chat via our forum (invisionboard). After some fiddling around this works quite nicely.

The one thing that is not working is merging of groups and roles.
The /me resource in the API of our forum returns an object for the primaryGroup or secondaryGroups field ({id, name, formattedName} or an array of this).

If I enable “Merge roles from SSO” nothing really happens. The logs seem to contain no errors.
I tried to create the roles prior to login, but that did not help either. The oauth code seems to contain some logic to extract a name from the group field but I not fluent with JavaScript and not really sure what is going on.

Is there some trick or way of “query” that can be put into the “Roles/Groups field name” in custom oauth to navigate to the field/object read from the forum?

Server Setup Information

  • Version of Rocket.Chat Server: 3.0.9
  • Operating System: Linux
  • Deployment Method: Docker
  • Number of Running Instances: 1
  • DB Replicaset Oplog:
  • NodeJS Version:
  • MongoDB Version: 4
  • Proxy: Apache
  • Firewalls involved: no

Any additional Information

Any hints what else to try would be cool! :slight_smile:

1 Like

This is a problematic issue and I would love to see this resolved too.