Do not allow adding guests to a Team from people picker if guest access is disabled
When guest access is disabled for Microsoft Teams, do not allow the ability for members to add a Guest. This option is disabled by default and can be viewed/activated by going to:
Admin Center -> Settings -> Services & add-ins -> Microsoft Teams -> Settings by user/license type
This is a source of confusion for end users because it allows members to specify a guest user by email address in the people picker control. The Teams application then proceeds to sends the email to the guest user, only to have the guest not be able to view the Team after logging in to their Teams client and switching to the new directory.
Please stop people picker from highlighting guest users if the guest setting is disabled.
Frederick Lin commented
This is also creating unnecessary guest users in our AAD if this is feature is not enabled in the tenant.