RocketChat / RocketChat/Rocket.Chat
new Oauth login with existing LDAP rocket.chat user gives "Email already exists"
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 46.1k
- Forks
- 13.9k
- Avg merge
- 3d 3h
- Merged PRs (30d)
- 130
Description
Hello,
we are currently trying to change our authentication method from SAML to OAuth.
We have Rocket.Chat version 3.13.2 and Ubuntu snap installation.
All Users already have a Rocket-Chat account over SAML and therefore also in the LDAP for Rocket.Chat.
We have successfully implemented a custom OAuth with Azure AD and new users can authenticate themselves over this method. Existing users get the error "Email already exists".


We have already activated the option "merge users", the error stays the same however.

Do you have any recommendations how we can switch to Oauth while keeping our current user-accounts.
Do you need any more informations?
Regards
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the OAuth login for an existing LDAP user on Rocket.Chat 3.13.2 with the Azure AD provider and the “merge users” option enabled. Compare this path with new-user authentication and determine what must change so an existing account is matched without the “Email already exists” error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, typescript
- Domain
- authentication
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100