I don’t have nextcloud installed yet, but you can try to login as admin and have a look at LDAP/AD integration settings. Have a look to the answers of @dnutan at the following thread please.
It’s not the same problem but perhaps an idea for a solution.