0
votes

We are creating a Team using /teams beta API (https://docs.microsoft.com/en-us/graph/api/team-post?view=graph-rest-beta&tabs=http#http-request) using Tenant Global access_token with the following template,

{
'template@odata.bind': "https://graph.microsoft.com/beta/teamsTemplates('standard')",
'displayName': teamName,
'description': teamDesc,
'visibility': 'Private',
'memberSettings': {
'allowCreateUpdateChannels': false,
'allowDeleteChannels': true,
'allowCreatePrivateChannels': false,
'allowAddRemoveApps': true,
'allowCreateUpdateRemoveTabs': false,
'allowCreateUpdateRemoveConnectors': false
},
'installedApps': [{
'teamsApp@odata.bind': `https://graph.microsoft.com/beta/appCatalogs/teamsApps(<app_id>)`
}]
}

We add a tenant user as member (Say user1) using add Member API((https://docs.microsoft.com/en-us/graph/api/group-post-members?view=graph-rest-beta&tabs=http).

Then we are creating channel in this Team using Create Channel Beta API (https://docs.microsoft.com/en-us/graph/api/channel-post?view=graph-rest-beta&tabs=http) using Tenant Global access_token

We can able to create up to 10 channels. After that it throws the following error,

{ error: 
  { error: 
    { code: 'Forbidden',
      message: 'Error. Maximum number of default channels reached: 10/10',
       innerError: [Object] } },
 error_status: 403 }

But we can able to create more than 10 channels if we create the Team and channels manually in Microsoft Teams client.

  1. Is there a restriction of creating channels using REST API ?
  2. Is that because of the Template that used ?

Is there any way to create more than 10 channel in a Team using REST API ?

Thanks in advance.

1

1 Answers

1
votes

We tried to create channels one by one using the api you mentioned https://docs.microsoft.com/en-us/graph/api/channel-post?view=graph-rest-beta&tabs=http on graph explorer and were able to create more than 10 channels. Can you provide more details on how you are trying to call the api or share some code snippet.

Thanks