Reputation: 33
Using graph API, I am unable to recreate the deleted channel.
Using Microsoft Team windows client, I have deleted a channel. Then, I tried to recreate with the same name and that seems working. But when I tried the same scenario using graph API, I get "Channel name already existed" error.
DELETE https://graph.microsoft.com/v1.0/teams/<groupid>/channels/<ABCchannelid>
POST https://graph.microsoft.com/v1.0/teams/<groupid>/channels
{
"displayName": "ABC",
"description": "desc"
}
Response
{
"error": {
"code": "BadRequest",
"message": "Channel name already existed, please use other name",
"innerError": {
"request-id": "guid",
"date": "2019-12-19T09:01:40"
}
}
}
Upvotes: 3
Views: 2173
Reputation: 541
@vasanth TT - When any channel is deleted, Teams holds the data for several weeks in order to allow Team Owner to recover the deleted channel. During that time one can not create new channel with the same name within the same team. You can create channel with the same name in different team but not in the same team where it was previously created
Upvotes: 0
Reputation: 10844
When you "Delete" a Channel or a Team, it's not immediately permanently deleted, it goes into a "temporary" deleted state so that it can be restored if it was deleted by accident. This means you can:
Obviously (1) is the easiest, if you just want the channel back.
Please don't forget to mark this as the correct answer if it helps you.
Upvotes: 0