botbuilder-dotnet: Operation returned an invalid status code 'NotFound' when calling TeamsOperations.FetchChannelListWithHttpMessagesAsync

What project is affected?

latest BF

What language is this in?

C#

What happens?

Operation returned an invalid status code ‘NotFound’ at Microsoft.Bot.Connector.Teams.TeamsOperations.GetResponseAsync[T](String url, Boolean shouldTrace, String invocationId, Dictionary2 customHeaders, CancellationToken cancellationToken) at Microsoft.Bot.Connector.Teams.TeamsOperations.FetchChannelListWithHttpMessagesAsync(String teamId, Dictionary2 customHeaders, CancellationToken cancellationToken) at Microsoft.Bot.Connector.Teams.TeamsOperationsExtensions.FetchChannelListAsync(ITeamsOperations operations, String teamId, CancellationToken cancellationToken) at GetChannelList(CancellationToken cancellationToken) in C:.…\TeamsContext\TeamsContext.ChannelExtensions.cs:line 46

What are the steps to reproduce this issue?

Called the above function to retrieve some teams info and hit this error.

What were you expecting to happen?

Success.

Can you share any logs, error output, etc.?

Above. Also This is the post from previous UpdateActivity that was successful (from ngrok) POST /api/skills/v3/conversations/19:74344caa321c411591735f7122d017ac@thread.tacv2;messageid=1611212147390-l_Icm-msteams-skillconvo/activities/1611212147390
200 OK This corresponds to the failure (above) GET /api/skills/v3/teams/19:74344caa321c411591735f7122d017ac@thread.tacv2/conversations
404 Not Found

Any screenshots or additional context?

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 15 (7 by maintainers)

Most upvoted comments

@ipraveenMS as far as I’m aware the TeamsInfo class has never worked with skills in any version of the SDK. If you have an example of a version of the SDK where it does work can you tell us what version? The reason it doesn’t work is due to the delegated turn context not having the required pieces to use TeamsInfo. This means there aren’t any simple workarounds currently available.

If you’re determined to do a work around I have one idea which seems reasonable, but I have not tested to confirm it works. You could setup some logic so the skill calls back to the parent when it wants to use the methods in TeamsInfo and have the parent forward the data back. If you wanted to follow this path then the parent would need to be installed in Teams so it would have access to data.

As for timelines that’s a good question. We are currently wrapping up our current cycle and will start planning work for our next cycle imminently. It’s possible that this gets picked up in our next cycle, but I’m not in a position to tell you it will definitely be in the next release.

Even var details = await TeamsInfo.GetTeamDetailsAsync(turnContext, turnContext.Activity.TeamsGetTeamInfo().Id, cancellationToken); hit the same NOT found error. With same REST path in ngrok

So I noticed one thing, the UpdateActivityAsync calls from skill hit a corresponding function in the VA side (SkillController:UpdateActivityAsync) REST path: v3/conversations/activities HTTP POST But when TeamsConnectorClient.Teams.FetchChannelListAsync function is called from skill, no function gets hits on VA side . There is no matching path that handles the v3/teams/conversations HTTP GET

So I suspect this is why VA return “not found” error because it cannot find a path that handles that REST API that got called. Not because it cannot find the data. It would be great if you look into this.

@Batta32

  1. I am using VA and skills. Called UpdatedActivityAsync from skill which works (POST http message above) and I call TeamsConnectorClient.Teams.FetchChannelListAsync from skill which fails (GET http message above returns NOT found).
  2. Its a regular VA and skills project (modified with our changes) and teams is configured as a channel in both skill and VA and messages are posted to teams just fine except this error.
  3. BF version is 4.11.1