How can I get the list of posts in Teams Channel?

yuki 20 Reputation points
2023-04-19T04:13:52.1+00:00

I want to get a list of past posts in particular Teams Channel.

I am admin of the channel I want the info of.

My Microsoft account is my company's account, so I figured I can not use data export page.

I used this line "GET /teams/{team-id}/channels/{channel-id}/messages" on Microsoft Graph and was told that I need an admin approval from Microsoft to consent a permission to run ChannelMessage.Read.All.

Is there any other official way besides above to get data of posts in Channel, hopefully put the data to Excel?

All information I need is the title, content, post date, post by whom and the replies to post.

If there aren't any, is it normal to get admin approval from Microsoft for such a small issue?

I am newbie to the company, I don't want to do thing that stands out.

Microsoft Teams
Microsoft Teams
A Microsoft customizable chat-based workspace.
9,224 questions
Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,801 questions
Microsoft Exchange Online Management
Microsoft Exchange Online Management
Microsoft Exchange Online: A Microsoft email and calendaring hosted service.Management: The act or process of organizing, handling, directing or controlling something.
4,240 questions
0 comments No comments
{count} votes

Accepted answer
  1. Dillon Silzer 54,746 Reputation points
    2023-04-19T04:34:23.64+00:00

    Hi Yuki, To utilize Microsoft Graph API you will need enough permissions within your organization to consent reading data.

    Just based off what you stated it looks like you may not be a apart of the IT team. Perhaps, you should reach out to your IT team to ask for this. I will try to answer your questions in order:

    #1 Is there any other official way besides above to get data of posts in Channel, hopefully put the data to Excel?

    You can use Microsoft Graph API to get a JSON response and convert it to Excel (CSV).

    #2 If there aren't any, is it normal to get admin approval from Microsoft for such a small issue?

    You do not need to get any approval from Microsoft. The "Admin Approval" is from Administrators within your Microsoft Azure Active Directory/tenant. This is why I mentioned speaking to your IT team.


    If this is helpful please accept answer.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful