5
votes

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>()
            {
                {"[email protected]", "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", "[email protected]": "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.

1
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
@Mallipriya-MSFT see my edited post for repro steps in Graph Explorer. - Patrik Hellgren
@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
I have the exact same problem here on my tenant - odrouin

1 Answers

0
votes

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?.