U4-10368 - Need option to set username different than e-mail for AD compatibility

Created by Brian Powell 29 Aug 2017, 17:23:33 Updated by Sebastiaan Janssen 09 Oct 2017, 14:54:07

Is duplicated by: U4-10515

Relates to: U4-10111

Subtask of: UAASSCRUM-1073

In Umbraco 7.7.0 Beta, if the username is the same as the e-mail address, the username field isn't shown when editing users. When creating users, the username field is never shown.

This causes problems for installations using Active Directory or similar external authentications. Username formats need to be consistent either sAMAccountName (username) or userPrincipalName (basically, the e-mail address) for the standard MembershipProviders out there. Not allowing the username to be set independently is going to create a mismatch in a lot of installations where existing installs will have sAMAccountName-style usernames and new ones will be forced to userPrincipalName. This will require mass changes of existing usernames to fix.

Can the username field be always visible and auto-set to the same thing as the e-mail address by default, or failing that, a configuration option allow to force its display?


Brian Powell 29 Aug 2017, 18:34:47

U4-10111 explains a bit about the underlying behavior of the user management tools that cause U4-10368.

Shannon Deminick 30 Aug 2017, 00:52:01

The username will display if it is different than the email. I assume that when you are using AD that you are auto-linking the accounts (with code, etc..) and not manually creating these linked accounts in the back office?

Brian Powell 30 Aug 2017, 03:02:30

@Shandem At least with my install, I manually create backoffice accounts as needed. We have minimal user turnover and other Umbraco site setup that needs completed for new users anyhow, so I had not seen it being worth the time to code auto-linking.

Shannon Deminick 30 Aug 2017, 04:02:25

Ah ok fair enough. I'll see what we can do!

Shannon Deminick 05 Sep 2017, 13:33:41

PR for review: https://github.com/umbraco/Umbraco-CMS/pull/2171 to test:

  • change this to false in config, ensure both username and email address are shown in the user editor for both an existing user, the invite dialog and the create dialog
  • when this is true, ensure that the username and email address are still shown if they are different in the database

New setting in umbracoSettings.config:

    <!-- by default this is true, if you set this to false then you 
        will always get both a username/password field in the user editor
        if this does not exist in config, the default is true. -->

Mikkel Holck Madsen 06 Sep 2017, 08:59:06

This works as expected, nice work

Priority: Normal

Type: Bug

State: Fixed


Difficulty: Normal


Backwards Compatible: True

Fix Submitted:

Affected versions: 7.7.0

Due in version: 7.7.0

Sprint: Sprint 67

Story Points: 1