Forum Discussion

paulomi07's avatar
paulomi07
Copper Contributor
Jun 28, 2019

Deleting a Team via Graph API

I am using the below API to delete the Team:

DELETE https://graph.microsoft.com/v1.0/groups/{id}

This successfully deletes the group, but it does not delete the team. I still see the team in the Microsoft Teams workspace as well as being able to get information about the team via Graph API. 

 

Am I doing anything wrong here? The documentation says "Delete the team and its associated group." at https://docs.microsoft.com/en-us/graph/api/resources/team?view=graph-rest-1.0

 

Thanks,

Paulomi

  • paulomi07 No, nothing wrong. This is the correct way to delete a Team through the API. Problem here is "timing": Teams and the Teams API (exposed through Graph) runs on its own backend, which caches information from Azure AD. Due to this, changes made on Azure AD side (like deleting the Group) don't translate immediately on the Teams side. It takes some time to become visible there.

     

    By now, your Team should have disappeared from the list. If not, please let me know!

Resources