Ldap sync pulls email attribute from AD only for some users

Nextcloud version: 21.0.1
Operating system and version: Debian Buster
Apache or nginx version: Apache 2.4.38
PHP version: 7.3

I set up NC with ldap sync. My LDAP server is samba AD (4.13.7). Within NC, I can see all users and the selected groups. However, for some users, the mail attribute is not pulled from the AD, whereas for others it is. I can see this in the “Users” tab; also, when I run

sudo -u www-data php /srv/www/nextcloud/occ user:info some_user

it will show the correct email: output for some users, and for other users that field would remain blank (though it is correctly filled in AD). All other fields and group memberships are correct. I can verify with ldapsearch that in both cases the same attributes in LDAP are present and that they are identical (except that the content of the attributes would be slightly different). I have not been able to discover any systematics in this.

What could I do to debug this?