Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

plugin is creating duplicate profile when login via Azure #105

Open
cpandya2909 opened this issue Jul 13, 2020 · 6 comments
Open

plugin is creating duplicate profile when login via Azure #105

cpandya2909 opened this issue Jul 13, 2020 · 6 comments

Comments

@cpandya2909
Copy link

when a user is login in via azure, it is creating a new user even if user is already present in system with a random string at end of name.

Screenshot 2020-07-13 at 4 45 10 PM

This is creating problem in user permission assignment.
@srvrguy
Copy link
Collaborator

srvrguy commented Jul 13, 2020

Unfortunately, the plugin can't determine all the possible naming schemes that people can use for existing accounts. If you're using logins based on the user's e-mail address, you can set the login strategy to "Same as Azure AD login", otherwise the default "Unique" method will try to avoid conflicting with existing user accounts. I'm not aware of any easy way to "consolidate" logins.

@cpandya2909
Copy link
Author

The login strategy is already set to "Same as Azure AD login". Login is set as user's email address and not by name. Still, the issues are happening. Also, it is not affecting all users but for few users only it is creating a duplicate accounts.

@andrei-dascalu
Copy link

Can an AD login "take over" an existing login if the usernames match? Is it possible to have a config to allow this? Like if I have existing users which use the same login name / email but I want to have them switch to AD and keep their owned / created tokens / etc ?

@roancath
Copy link

roancath commented Mar 2, 2021

Hi, any updates on this? we're having the same issue...

@alexsuter
Copy link

Hi Guys

I faced the same issues. So I just updated the users directly on the database. e.g.:

UPDATE users SET external_identity_provider = 'aad', external_id='[email protected]', external_login='[email protected]' WHERE login = 'user';

@Breee
Copy link

Breee commented Apr 12, 2022

I don't think you have migrated your user beforehand

e.g. if you have a user myuser with external identity [email protected] you have to patch him beforehand:

curl -X POST -v -u $SONAR_TOKEN: "https://sonar.example.com/api/users/update_identity_provider?login=myuser&[email protected]&newExternalProvider=aad"

It's stupid, but you have to make sure that case of the external login is correct, i.e.
If the external login is sent like this: [email protected] then you gotta make sure the same is in the DB.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants