如果大家经常使用Graph API来对Teams进行操作管理的话,有时候会遇到一些奇怪的问题,我前两天还在Stack Overflow上回答了一个用户的问题,这个问题我自己也遇到过。所以我想用这篇文章来分享一下,万一以后大家遇到类似的问题,就有所防备。
这个问题实际上是一个已知问题,官方的解释在这里
We recommend that when you add an owner, you also add that user as a member. If a team has an owner who is not also a member, ownership and membership changes might not show up immediately in Microsoft Teams. In addition, different apps and APIs will handle that differently. For example, Microsoft Teams will show teams that the user is either a member or an owner of, while the Microsoft Teams PowerShell cmdlets and the /me/joinedTeams API will only show teams the user is a member of. To avoid confusion, add all owners to the members list as well.
讲的是说,如果我们需要给一个团队(te