Skip to content

Microsoft Teams Connector returns null when creating shared channel #6469

@team-connectors-int-automation

Description

Summary

The Microsoft Teams Connector returns null when creating a shared channel, even though the channel is successfully created. This appears to be a limitation in how the Microsoft Graph SDK handles the API response for shared channel creation.

Context

Reported by <@U06LBMLBNG2> and investigated by <@U04VC5LB44F>. The issue occurs when using the CreateChannelOperation in the Microsoft Teams Connector.

Expected Behavior

The connector should return a Channel object as defined in the code:

return graphClient.teams().byTeamId(model.groupId()).channels().post(channel);

Actual Behavior

The variable containing the channel information is null, despite the channel being successfully created.

Root Cause

The Microsoft Graph SDK does not properly support the API response when creating a shared channel. According to the Microsoft Graph API documentation for creating a shared channel, the API returns:

HTTP/1.1 202 Accepted
Content-Type: application/json
Content-Location: /teams/7640023f-fe43-4cc7-9bd3-84a9efe4acd6/operations/359d75f6-2bb8-4785-ab2d-377bf3d573fa
Content-Length: 0

The SDK maps this 202 Accepted response with an empty body to a null value instead of properly handling the asynchronous operation.

Additional Notes

  • This is a limitation of the Microsoft Graph SDK itself, not the Connector implementation
  • Workaround: Use the Microsoft Graph API manually via the REST Connector until the SDK properly supports this response format
  • Investigation required: Determine if there's a way to retrieve the result after the asynchronous operation completes
  • Related code: CreateChannelOperation.java

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions