Migrating from Local Users to Azure Authentication

We are currently running Gitlab Community Edition 13.3.2 with local users and would like to start using Azure Authentication. The local users and the Azure users have the same user names and email. I have configured a test instance and can authenticate with Azure when there are no users on the system.

The problem is that I haven’t found a way to login with Azure credentials for an existing local user.
Ex. We have user abc with email abc@example.com.
The same username with the same email exists in Azure.

When I login with Azure I get this error:

Sign-in using Azure auth failed

Sign-in failed because Email has already been taken.

Try logging in using your username or email. If you have forgotten your password, try recovering it

(See attached image)

I see that others have had problems moving from local users to other providers but so far haven’t found posts with answers.

I have upgraded to 13.4 and used “autoLinkUser” option, both with “true” and with "[‘azure_oauth2’] but still doesn’t work. Here is my values yaml with omniauth configuration stanza:

global:
appConfig:
omniauth:
allowBypassTwoFactor:
allowSingleSignOn:
- azure_oauth2
autoLinkLdapUser: false
autoLinkSamlUser: false
autoLinkUser: true
autoSignInWithProvider: null
blockAutoCreatedUsers: false
enabled: true
externalProviders:
providers:
- key: provider
secret: azure-gitlab-client-secret
syncProfileAttributes:
- name
- email
syncProfileFromProvider:
- azure_oauth2

Hello,
I’m also facing the same issue. Did you manage ton find a solution ?
Thank you