updateUser() with Admin SDK does not work

270 views
Skip to first unread message

Mathias S

unread,
Oct 7, 2019, 10:46:26 AM10/7/19
to Firebase Google Group
I like to update the email address for a user with the following code:
UserRecord.UpdateRequest request = new UserRecord.UpdateRequest(uid).setEmail("updat...@email.com");
UserRecord userRecord = FirebaseAuth.getInstance().updateUser(request);

But this leads to the following error:
 "message": "EMAIL_EXISTS",
 
"domain": "global",
 
"reason": "invalid"

No, the email passed to setEmail() does not exist. Why does Firebase think it does???

Sam Stern

unread,
Oct 7, 2019, 11:43:24 AM10/7/19
to Firebase Google Group
Hey Mathias,

Can you show what happens if you call getUserByEmail?

That will return a UserRecord to show why Firebase thinks that email exists.

- Sam

--
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-tal...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/8869414e-0ee9-4165-81b9-e2a267854cef%40googlegroups.com.

Mathias S

unread,
Oct 7, 2019, 5:33:14 PM10/7/19
to Firebase Google Group
You are right, there was another user with this email address already. I have missed that user.
Reply all
Reply to author
Forward
0 new messages