Inconsistency in MS Teams graph api - GET channels

Integration Teams 1 Reputation point
2021-07-22T14:31:58.903+00:00

In the response of GET - https://graph.microsoft.com/v1.0/teams/{team_id}/channels?$filter=membershipType eq 'private'.

I am getting channels which are not visible in the Teams app interface.
e.g.
{
"id": "",
"createdDateTime": "",
"displayName": "testingteam",
"description": null,
"isFavoriteByDefault": null,
"email": null,
"webUrl": null,
"membershipType": "private"
},
Is there any key using which i can differentiate these forbidden channels from the valid ones?

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,716 questions
Microsoft Teams Development
Microsoft Teams Development
Microsoft Teams: A Microsoft customizable chat-based workspace.Development: The process of researching, productizing, and refining new or existing technologies.
2,886 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Shivam Dhiman 5,946 Reputation points
    2022-03-02T16:11:11.483+00:00

    Hi @Integration Teams

    I am not able to reproduce your issue. The API is returning desired response.
    179382-capture.png

    You can further check if all webUrl is part of teams for which you are getting null. If yes, you can use this filter to get teams where webUrl is not empty using this endpoint

    https://graph.microsoft.com/v1.0/teams/{teams-id}/channels?$filter=webUrl ne null  
    

    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have further questions about this answer, please click "Comment".

    0 comments No comments