Forum Discussion
In Entra ID, is it possible to link accounts (ex: google and facebook)
I couldn't find any reference in the documentation, which is why I'm asking here in the forum.
Based on the sample https://woodgrovedemo.com/, if I perform a sign-up self-registration with email /password and then try to sign in via Google, it returns that an account already exists and requires me to log in using email and password. The same happens if I sign up with Google and later try to log in with Facebook—I am forced to sign in via Google.
Is there no way to link accounts into a single user, allowing authentication with any of them? This is a feature that most CIAM solutions support.
Maybe with PATCH /user graph API?
Thank you.
3 Replies
- pauloapfCopper Contributor
Thanks for your response.
I came across this Medium post from 2024 "A deeper dive into linking with Entra External ID for Customers (CIAM)" It suggests that linking accounts via API might be possible, but also prone to errors.
If this approach is indeed feasible, I wonder how it could be implemented. Is there a way to trigger an action after login to search for a corresponding account and link it automatically? I know it is possible in the custom authentication extension, but the events there is related to Sign Up.
ThanksYes, in theory you can link identities via API, but it’s a custom solution and can be error-prone. You’d need to build a custom flow that checks, right after sign-in, whether a corresponding account already exists and links them. Although B2C supports custom policies and extensions, there’s no built-in mechanism to do this automatically, you have to code the logic yourself.
Hi, at the moment, Entra ID (B2C) doesn’t have an out-of-the-box way to merge multiple social logins into a single user. If you create an account with email/password and later try using Google or Facebook, Entra ID will see a separate identity and won’t automatically link it.
However, you can implement custom solutions via B2C custom policies, where you handle the logic for linking and merging accounts yourself. A simple Graph API PATCH by itself isn’t enough; you need extra logic to match multiple identities to the same user object.