An error occurred while saving the commentMicael commented
This is a major bug. As we diagnosticated, here's what seems to happen : Teams has its own database and is synched with O365 groups. But if you invite a guest in your O365 group, and he has not yet accepted Azure invite (so pending in AzureAD), the sync does not happen and he will never be able to access Teams. So, all apis will fail ( Powershell, Flow) that uses Teams api with add-teamUser, since it uses O365 group adding in reality and not the internal Teams add user! Confusing as F***, and also, useless since you can only add guest by Teams interface!