2
votes

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

1 Answers

0
votes

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