+ Start a Discussion
Justin MitchellJustin Mitchell 

Google SSO is trying to change my email address after logging in

tl;dr - Is there a way to configure the authentication provider settings in Salesforce to allow my Salesforce user email address to not match the Google username?

I have My Domain configured in a sandbox, and I am trying to add Google as an authentication provider. I have set it up, and it is working, however we have an unusual situation which is causing an issue.

My company uses Gmail for our corporate email. A long time ago, the company changed names, which means everyone has a Google username with the old domain (...@c--tech.com), however we all use an alias email address to send and receive email (...@f--ts.com). So in Salesforce, every user's email address is ...@f--ts.com, but when we sign into Google, we have to use the ...@c--tech.com login, otherwise we're not able to sign in.

After enabling Google as an authentication provider, I am now able to log into my Google account from the mydomain.salesforce.com login page and it successfully logs me into the sandbox. Hooray! However, every time I do, I get two emails, one notifying me that "We received a request to change your Salesforce account's email address" (from jmitchell@f--ts.com to jmitchell@c--tech.com), and a second email asking me to confirm this change.

This wouldn't be such a big deal if it happened only once, but it happens every time I log in using Google authentication.

How do I prevent this? Is there a way to use Google as an authentication provider if the user's email address does not match their Google username?