Why does the graph API return a ReadableStream?

Anonymous
2025-03-04T17:14:55.78+00:00
export async function createTeamChat(displayName) {
  const team = {
    '******@odata.bind': "https://graph.microsoft.com/v1.0/teamsTemplates('standard')",
    displayName: `Jurimesh Support - ${displayName}`,
    description: 'This team is for support and questions about Jurimesh.',
    visibility: 'Private',
    members: [{
        '@odata.type': '#microsoft.graph.aadUserConversationMember',
        roles: ['owner'],
        '******@odata.bind': `https://graph.microsoft.com/v1.0/users/${DEFAULT_MICROSOFT_CHAT_OWNERS[0]}`
      }],
    channels: [
      {
        displayName: 'Announcements',
        description: 'This channel is for communication and announcements regarding Jurimesh.',
      },
      {
        displayName: 'Support',
        description: 'This channel is for support and questions about Jurimesh.',
      }
    ]
  };

  return await graphClient.api('/teams')
    .post(team);
}

This function returns a Readable Stream. it should return a json when awaited as described in the API specs of creating a team. Why is this happening?

Microsoft Security | Microsoft Graph
0 comments No comments
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.