There is an Office 365 organization for the domainA.com. Users are synced with AAD Connect and Hybrid Configuration is in place with Exchange. In this Exchange on-prems organization there is a synced user in AAD corresponding to a mail user whose external email address of the mail is John.Doe@domainB.com
John.Doe@domainB.com is a member of the domainB.com Office 365 tenant and he must be add to a Microsoft teams team as guest user, so he may log on with Office 365 credential.
If I try to add his as guest user I get an error, but I can add it as member of the team using the synced user, but, if I do so, I must assign a Microsoft Team license.