# How can I automatically confirm a secondary email address?

**URL:** <https://meta.discourse.org/t/how-can-i-automatically-confirm-a-secondary-email-address/300354>\
**Category:** Product Support\
**Created:** [March 21, 2024, 1:25pm UTC](https://meta.discourse.org/t/how-can-i-automatically-confirm-a-secondary-email-address/300354 "2024-03-21T13:25:41Z")\
**Posts on this page:** 1\
**Showing post:** 10

<div class="post-metadata">

**Author:** ![Tris20](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tris20/32/264639_2.png) [@Tris20](https://meta.discourse.org/u/Tris20)\
**Post date:** [March 27, 2024, 1:47pm UTC](https://meta.discourse.org/t/how-can-i-automatically-confirm-a-secondary-email-address/300354/10 "2024-03-27T13:47:25Z")

</div>

Thanks for the suggestions. I gave them a try in the following way:

## 1. Add secondary email to user via api

The email is unconfirmed, but tied to the account

 ![image](https://global.discourse-cdn.com/meta/original/4X/e/3/a/e3a5a79536bb3799fafe32e5ae5d54133101efa2.png)

## 2. Configure the following settings:

![image](https://global.discourse-cdn.com/meta/original/4X/1/5/3/153df70975ed8f9226e2259400cc4c6fc6aa814d.png)

![image](https://global.discourse-cdn.com/meta/original/4X/8/a/3/8a3494c150d189aadf34146d04c0d57629579e3e.png)

![image](https://global.discourse-cdn.com/meta/original/4X/0/b/4/0b4a9f13b84369b9a59797aa614ac870700517d7.png)

- I forgot to set the saml sync to true, however I don’t think that would have affected the outcome. The issue still seems to be conflict in terms of the email confirmation.

## 3. Result

The result was the a new user account was created based on the new company email. Worst case I could merge these, but that is a really nasty worst case.

I can still see the unconfirmed email in the old account. I try to resend the confirmation just to see what would happen but I get a 403 error(Forbidden).

It looks like the email needs to be confirmed _first_ before we can syncronise them 😕

Unless there’s something I’m missing, it looks like I need a way to confirm the second email.

> [@thoka](#):
>
> This is not a direct answer to your question, but: In the case of mass-renaming of email-addresses, you could do it via rails console:

I wonder if this still has the same issue in terms of confirmation, or are they assumed to be confirmed? An additional complexity is that the user part of [user@company.com](mailto:user@company.com) has also changed. But I suspect that would mean we run through a csv of mappings between the old and new emails.

---

_[View the full topic](https://meta.discourse.org/t/how-can-i-automatically-confirm-a-secondary-email-address/300354)._
