We have about 500 AD user accounts and 300 email mailboxes - 200 of which have a Teams account. We are currently still using our on-premises Exchange 2016 server for all email accounts. When searching for a user in Teams, the unlicensed accounts are also displayed. Now there are plenty of tutorials and posts about how to limit this via customized Exchange Online address lists. Unfortunately, all the posts only cover Exchange Online. Does anyone have an idea how to solve this for on-premise environments as well?
Best regards