OAuth - is it possible to link new user to existing departaments/groups?

I need to implement following functionality: user will be logging via OAuth. In the parameters taken from oauth, there will be name, email, and list of groups. I have to add this user to corresponding groups/departments in seafile. How can I achieve that? There is no such thing described in documentation.

There is no such a feature for OAuth yet. In SAML authentication, there is such a feature.

Thank you for information. I asked my collegues, and maybe we could use saml via keycloak. Could you please tell me: which field should i use to add user to multiple departments? Would it be “department”?

The atrribute in saml claims of group is called “seafile_groups”. See: Update saml2_in_10.0.md by r350178982 · Pull Request #306 · haiwen/seafile-admin-docs · GitHub