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 Teams | Development
Microsoft Teams | Development
Building, integrating, or customizing apps and workflows within Microsoft Teams using developer tools and APIs
Microsoft Security | Microsoft Graph
{count} votes

1 answer

Sort by: Most helpful
  1. Shivam Dhiman 6,086 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

Your answer

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