External authentication (Oauth2) and Admin/Manager role

Dear all,

I have spent a couple of evenings to figure out what the options are to assign roles to users as one would do with LDAP_GROUP_ADMIN_DN when using LDAP. The user get authenticated through OIDC with keycloak using the Oauth2 plugin.

Because of the comment // Enable/Disable groups synchronization when external authentication is used. above LDAP_GROUP_SYNC, I thought it may be possible to authenticate using Oauth2 and then the user will be added to the group defined in LDAP_GROUP_ADMIN_DN. But that probably doesn’t work because the assignment of the role is happening on (LDAP) authentication and therefore our users will never pass this routine.

When I went through all the issues on gh and posts in here, I believe I read some posts where someone might have found a solution but didn’t share their solution.Anyone figured out how to do it or has some hints for me?

Thanks a million!