Configuring nextcloud for LDAP email addresses

Hi Folks,
Our LDAP directory splits entities into two trees, one for Accounts (where UID and Password, ssh keys, etc., are held) and one for People (where email address, photos, personal address etc., are stored). There’s a many-to-one mapping between Accounts and People.

So right now I have a query string for LDAP in the Users panel:

(&(|(objectClass=People)(objectClass=account))(!(ou:dn:=Retired))(!(ou:dn:=Externals))(!(ou:dn:=System))(!(ou:dn:=Computers))(memberof=cn=active,ou=....)))

And in the Login attributes panel:

(&(objectClass=account)(uid=%uid)(!(ou:dn:=Retired))(!(ou:dn:=Externals))(!(ou:dn:=System))(!(ou:dn:=Computers)))

People can log in, but how do I specify the query to lookup email addresses, etc?