Microsoft Graph removal of Owners from Group is inconsistent in Microsoft Teams

旧巷老猫 提交于 2019-12-11 09:41:25

问题


I'm automating Microsoft Teams lifecycle (create, add membmers and owners, etc), and I have Teams with a set of Owners and Members (the Owners are also Members). Now when I use the Remove owners endpoint of the Microsoft Graph, I'm noticing some inconsistencies.

Expected behaviour: Owner gets removed as Owner, but stays in place as Member (both in Azure AD as in Microsoft Teams).

Observed behaviour

  • v1.0 endpoint: In Azure AD, it's as expected. In Microsoft Teams however, the user stays marked as Owner (in the members list) with the associated permissions. I have been waiting for weeks, it just doesn't update.
  • beta endpoint: In Azure AD, it's as expected. In Microsoft Teams however, the user is removed completely. He doesn't exist in the membership list anymore and he cannot access Microsoft Teams anymore.

It looks like membership changes happening through the Microsoft Graph API don't propagate correctly to Microsoft Teams.

What is supposed to be the correct behaviour? Is it an issue with the Graph or with my approach?


回答1:


The expected behavior is the /beta variant. This reason for the different behavior isn't clear but it likely stems from the Teams APIs still being in beta and v1.0 not being fully aware of Teams (or the additional attributes it needs to change).

If you are looking to migrate a user from Owner to Memeber, you would make two calls:

  1. Remove the user from the Owners list using DELETE /groups/{id}/owners/{id}/$ref
  2. Add the user to the Members list using POST /groups/{id}/members/$ref


来源:https://stackoverflow.com/questions/50237493/microsoft-graph-removal-of-owners-from-group-is-inconsistent-in-microsoft-teams

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!