Skip to content

Don't allow the creation of user with same Email id in the same domain #8523

Open

Description

@kiranchavala

ISSUE TYPE

Enhancement/Improvement Request

COMPONENT NAME

Component: API/ UI

CLOUDSTACK VERSION

Cloudstack version 4.18

SUMMARY

Don't allow the creation of user with same Email id in the same domain

Steps to reproduce the issue

  1. Navigate to domain > Accounts > Click on a particular Account > Create say user1 with (test@gmail.com)

  2. Navigate to domain >Accounts > Click on a particular Account > Create say user2 with (test@gmail.com)

Screenshot

Screenshot 2024-01-17 at 12 32 25 PM

Expected behaviour

Cloudstack should not allow to create the user with same Email address in the same domain

If a oauth is configured for a user in a cloudstack , email address is used as key to identify.

Cloudstack throws an error saying there is an already multiple user having the same email address in the same domain.

It would be proactive checking if we could block the creation of user with same email address during the user creation

Activity

  1. DaanHoogland commented on Jan 17, 2024

    @DaanHoogland
    Contributor

    I think this needs more exploration @kiranchavala as it can be useful to have the same user in multiple accounts in the same domain, for some. In the case of OAuth this may be a problem indeed. at the moment it is not allowed to have the same userid, so maybe it is trivial but for some it may make sense to have "dahnUser" and "dahnAdmin", which makes it a backwards compatibility concern as well.

  2. added this to the unplanned milestone on Jan 17, 2024
  3. kiranchavala commented on Feb 9, 2024

    @kiranchavala
    MemberAuthor

    Thanks @DaanHoogland

    Can we consider if ouath is enabled in global setting , we should not allow the creation of accounts with same email address

    Screenshot 2024-02-09 at 1 23 12 PM

    cc @harikrishna-patnala your opinion on this.

  4. DaanHoogland commented on Feb 12, 2024

    @DaanHoogland
    Contributor

    accounts don't have email addresses, users do. That makes our design and bit awkward for integration with oauth, as users log into an account to do things on the accounts behalf. I think we should allow users with the same email in different accounts, but what can not happen is the same user-id in a domain.
    I think the bug is not allowing creation of multiple users in different accounts with the same email, but not allowing the login of said users. cc @harikrishna-patnala

  5. github-actions commented on Dec 31, 2025

    @github-actions

    This issue is stale because it has been open for 120 days with no activity. It may be removed by administrators of this project at any time. Remove the stale label or comment to request for removal of it to prevent this.

  6. harikrishna-patnala commented on May 11, 2026

    @harikrishna-patnala
    Member

    accounts don't have email addresses, users do. That makes our design and bit awkward for integration with oauth, as users log into an account to do things on the accounts behalf. I think we should allow users with the same email in different accounts, but what can not happen is the same user-id in a domain. I think the bug is not allowing creation of multiple users in different accounts with the same email, but not allowing the login of said users. cc @harikrishna-patnala

    @DaanHoogland we cannot allow oauth login if multiple users are found with same email id. The question raises to which user to create the login.

    I kind of agree with @kiranchavala to somehow give operators to configure such that duplicate emails are not allowed. I could think of the following solutions.

    1. Create a new domain level setting or or new detail while creating the domain, which describes whether same emails are allowed or not. By default we can keep the old way
    2. Another solution is while enabling oauth on specific domain, check if there are any existing users having duplicate emails and throw the exception and also while creating new users check if oauth is enabled and if there is same email present in the database or not

    cc @kiranchavala

  7. kiranchavala commented on May 11, 2026

    @kiranchavala
    MemberAuthor

    accounts don't have email addresses, users do. That makes our design and bit awkward for integration with oauth, as users log into an account to do things on the accounts behalf. I think we should allow users with the same email in different accounts, but what can not happen is the same user-id in a domain. I think the bug is not allowing creation of multiple users in different accounts with the same email, but not allowing the login of said users. cc @harikrishna-patnala

    @DaanHoogland we cannot allow oauth login if multiple users are found with same email id. The question raises to which user to create the login.

    I kind of agree with @kiranchavala to somehow give operators to configure such that duplicate emails are not allowed. I could think of the following solutions.

    1. Create a new domain level setting or or new detail while creating the domain, which describes whether same emails are allowed or not. By default we can keep the old way
    
    2. Another solution is while enabling oauth on specific domain, check if there are any existing users having duplicate emails and throw the exception and also while creating new users check if oauth is enabled and if there is same email present in the database or not
    

    cc @kiranchavala

    Thanks @harikrishna-patnala, I like the first option 1

    to have a setting at Domain/zone/Global level, which prohibits the account creation if there is an already account with the same email address

  8. github-actions commented on Sep 13, 2026

    @github-actions

    This issue is stale because it has been open for 120 days with no activity. It may be removed by administrators of this project at any time. Remove the stale label or comment to request for removal of it to prevent this.

  9. added
    long-term-plan
    and removed on Oct 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions