Map existing users to groups using Group Managed Accounts
Currently, attempting to create a group managed account when a user with that email already exists throws an error:
In this scenario, the user already exists on GitLab.com with that email address as their primary address. That user must now:
- Log into that account,
- De-associate that account with their email address from the connected identity provider,
- SSO in again and create their linked user.
Instead - since we know that the user has access to the email address based on the SAML response from the identity provider - we should just map the current user to the group as a managed account.
- If a user exists with a confirmed primary email address that matches the email address we receive from the connected identity provider, ask the user if they'd like to map that user to the group.
- If so, set the existing user account with that email address as a group managed account. Log the user into the account.
- If not, they'll need to free up their email address on that account and SSO in again.