Get 403 forbidden to list private channel messages

problem asker 61 Reputation points
2022-02-11T09:58:01.007+00:00

I login graph explorer with admin user to try list teams channel messages

https://graph.microsoft.com/v1.0/teams/{team-id}/channels/{channel-id}/messages

but when I list a private channel (admin user is not member) or private teams (admin user is not member) messages will get 403 Forbidden.

Is only member can list private team or private channel messages?
There has any solution for admin user to list private team or private channel messages? (admin not member, and I don't want admin user become those teams/channels member)

Thanks!

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,455 questions
0 comments No comments
{count} vote

Accepted answer
  1. HarmeetSingh7172 4,811 Reputation points
    2022-02-11T11:51:26.09+00:00

    Hi @problem asker ,

    Any team owner or team member can create a private channel but only members of that private channel can list the messages. Team owners can not see the files, conversations or the member list of a private channel. You can check this documentation to know more.

    Alternatively, you can use application permissions but that fall under Protected APIs.

    Before calling this API with application permissions, you must request access. For details, see Protected APIs in Microsoft Teams.

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


1 additional answer

Sort by: Most helpful
  1. CarlZhao-MSFT 36,411 Reputation points
    2022-02-11T10:20:11.183+00:00

    Hi @problem asker

    This is an expected error, only the owner or member of a private channel can list private channel messages, and as far as I know there is currently no support for listing private channel messages using application permissions. I suggest you submit user voice seek support from the Microsoft Graph product team.


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.