5

I am creating a new private channel in an existing team using Graph. After this, I want to create a new tab in that channel. When doing a POST to the tabs endpoint I almost always get a 404 NotFound with the message No active channel found with channel id: 19:690... but after waiting a few minutes after creating the private channel the tabs endpoint is available and I can create the tab.

This is always successful if creating a standard channel.

I can reproduce this using Graph SDK and Graph Explorer.

I can just try to list available tabs after creating the channel in the following way using Graph SDK to be able to see the problem:

    var graphClient = new GraphServiceClient(authProvider);

    var channelRequest = new Channel()
    {
        DisplayName = "Test",
        MembershipType = ChannelMembershipType.Private,
        Members = new ChannelMembersCollectionPage()
        {
          new AadUserConversationMember
          {
            Roles = new List<String>()
            {
                "owner"
            },
            AdditionalData = new Dictionary<string, object>()
            {
                {"user@odata.bind", "https://graph.microsoft.com/v1.0/users('{user-id}')"}
            }
          }
      }
    };

    var channel = await graphClient.Teams[teamId].Channels
        .Request()
        .AddAsync(channelRequest);

    //The following will be successful so we can see that the channel has been created  
    var newChannel = await graphClient.Teams[teamId].Channels[channel.Id]
        .Request()
        .GetAsync();

    //The following will return an error saying No active channel found with channel id: 19:690... but after waiting a few minutes this would be successful
    var newChannelTabs = await graphClient.Teams[teamId].Channels[channel.Id].Tabs
        .Request()
        .GetAsync();

Anybody else seeing the same problem or am I missing something?

EDIT
Steps to reproduce in Graph Explorer:

  1. Create a new Team Site called Test in SharePoint
  2. Get the group id: GET https://graph.microsoft.com/v1.0/groups?$filter=displayName eq 'Test'&$select=id
  3. Enable a team for the group: PUT https://graph.microsoft.com/v1.0/groups/{groupId}/team with the request body { "memberSettings": { "allowCreatePrivateChannels": true, "allowCreateUpdateChannels": true }, "messagingSettings": { "allowUserEditMessages": true, "allowUserDeleteMessages": true }, "funSettings": { "allowGiphy": true, "giphyContentRating": "strict" } }
  4. Create a new private channel in the team: POST https://graph.microsoft.com/v1.0/teams/{groupId}/channels with the request body { "displayName": "PrivateChannel1", "membershipType": "private", "members": [ { "@odata.type": "#microsoft.graph.aadUserConversationMember", "user@odata.bind": "https://graph.microsoft.com/v1.0/users('{user id for an existing user}')", "roles": [ "owner" ] } ] }
  5. Get the tabs for the private channel: GET https://graph.microsoft.com/v1.0/teams/{groupId}/channels/{channelId for the private channel}/tabs

The results I got when testing this in Graph Explorer was that the first channel seems ok but when creating a second and third channel I started seeing the issue with 404 NotFound. I also see that my earlier assumption that the error went away after a few minutes wasn´t correct, for the third channel I still after 30 minutes get the error in about half the attempts.
We have seen this problem in multiple customer tenants the last week or so but as of today I can only reproduce it in one tenant.

  • Probably similar to this: https://stackoverflow.com/questions/61502155/createchannel-in-graphapi-sometimes-results-in-not-creating-the-corresponding-sh – user2250152 Feb 24 '21 at 06:14
  • Could you please test the same using graph explorer or postman with required permissions? Will try reproducing the issue from our end and update you as soon as possible. – Mallipriya-MSFT Feb 25 '21 at 08:25
  • @Mallipriya-MSFT see my edited post for repro steps in Graph Explorer. – Patrik Hellgren Feb 25 '21 at 11:33
  • @Mallipriya-MSFT unfortunately we have started seeing the problem again in one of our customers tenants again today but there it seems to be a bit less frequent. Do you have any news? Do you need a tenant id or request id to look into it? – Patrik Hellgren Feb 26 '21 at 16:05
  • I have the exact same problem here on my tenant – odrouin Mar 02 '21 at 13:27
  • Hi @PatrikHellgren, I am able to create tab and also able to get the tab in a private channel. Just to confirm are you trying to get the channel without creating a tab in a channel or after creating a tab in private channel? – Mallipriya-MSFT Mar 03 '21 at 09:24
  • @Mallipriya-MSFT I am still seeing this in two out of four tenants that I have tested with and as you can see odrouin is also seeing this. I see the problem in both cases you describe but it is intermittent. Sometimes I can create a private channel and create a tab in that channel but the next tab might fail with this error, the next time I can create a private channel but the first tab fails. Also if I create a private channel using Graph Explorer and then repeatedly try to get the tabs in that channel, some requests return an empty array (which is correct) and some the error. – Patrik Hellgren Mar 03 '21 at 15:56
  • @PatrikHellgren, Could please provide us the request details of the APIs used so that we can check the Graph Logs. – Mallipriya-MSFT Mar 08 '21 at 08:48
  • @Mallipriya-MSFT Here is the request details of a failed request using Graph Explorer: { "error": { "code": "NotFound", "message": "No active channel found with channel id: 19:ee9025aabe654083924edd7195e1a0ad@thread.tacv2", "innerError": { "date": "2021-03-08T12:59:24", "request-id": "a41390d9-332a-4edd-8644-65fd2c8f93b8", "client-request-id": "4b8abebb-dd7f-b042-74be-a24c0ab849e2" } } } – Patrik Hellgren Mar 08 '21 at 14:15
  • @Mallipriya-MSFT Do you have any update regarding this? We are still seeing the issue. – Patrik Hellgren Mar 23 '21 at 14:31
  • Hi @PatrikHellgren- When you create a channel using graph API it will take some time to update. Adding tab to the created channel just after creating a channel will fail.As mentioned in the [issue](https://stackoverflow.com/questions/61502155/createchannel-in-graphapi-sometimes-results-in-not-creating-the-corresponding-sh) we need to wait for SPO provisioning async channel creation succeeds Are you facing any issue after few minutes of creating channel? are you not able to list tabs of a channel after some time? – Nikitha-MSFT Mar 24 '21 at 05:18
  • @Mallipriya-MSFT Yes, we can sometimes see the issue several hours after creating the private channel. And as I said earlier it is intermittent, after creating the channel the first get request for the tabs is successful, then some requests fail, then some requests is successful again and so it continues for a long time. And this is in just a couple of tenants right now but I have several others where I don't see any issues with this so the issue you link to doesn't seem to come into play at all here. Have you had a chance to look at the logs for the Request Id I commented on before? – Patrik Hellgren Mar 24 '21 at 11:26
  • @PatrikHellgren - please check my comment above – Nikitha-MSFT Mar 29 '21 at 06:09

1 Answers1

0

For better visibility coping answer from @nikiha's comments

When you create a channel using graph API it will take some time to update. Adding tab to the created channel just after creating a channel will fail. As mentioned in the issue we need to wait for SPO provisioning async channel creation succeeds. Are you facing any issue after few minutes of creating channel? are you not able to list tabs of a channel after some time?.

Jagadeesh-MSFT
  • 316
  • 1
  • 4