Possible to setup LDAP where you can login with email but sign-in cache samAccountName?

Nextcloud version (eg, 12.0.2):16.0.4
Operating system and version (eg, Ubuntu 17.04):16.04
Apache or nginx version (eg, Apache 2.4.25): 2.4.18
PHP version (eg, 7.1): 7.2

  1. have external storage configured to a SMB/CIFS
  2. i have it setup that LDAP users use email to login

When users login to nextcloud the SMB external storage does NOT mount with “Log-in Credentials, saved in session”
**When user login to nextcloud WITH samAccountName instead of email, SMB external store DOES MOUNT.


  1. logins work for same account with email and samaccountname
  2. when using email to login it does not convert in the background to samaccountname -> thus SMB mount with Log-in Credential saved in session does not function -> how do i go about doing this with users only being able to use email as a login.

emails look like username@domain.com and the samaccountname is username_clientNickname in my multi-tenant environment