web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Getting messages from ...
Power Apps
Unanswered

Getting messages from Microsoft Teams

(0) ShareShare
ReportReport
Posted on by 22
Hello, I am trying to incorporate Microsoft Teams into my power app. I have figured out how to post a message to a team but I am trying to figure out how I can see the reply to that message. Is this possible? Here is the code I am using to post a message... MicrosoftTeams.PostMessageToChannel(Dropdown3.Selected.id, /* <-- Team Id */Dropdown4.Selected.id, /* <-- Channel Id */{body:{content:"Text",contentType:1}}) (This works great) I was thinking it would be something similar to this MicrosoftTeams.GetMessagesFromChannel(Dropdown3.Selected.id, /* <-- Team Id */Dropdown4.Selected.id, /* <-- Channel Id */) but that is returning an error...Any thoughts would be appreciated! Thanks!
Categories:
I have the same question (0)
  • Verified answer
    v-sheyu-msft Profile Picture
    on at

    hi @Stmorgan

    Can you share a bit more about your issue?

    Can you show me the error message?

     

    Do you use the label control to display the returned message?

     

    I made a test .  There’s no issue on my side.

    15.PNG

    Set the items property of dropdown1 to:

    MicrosoftTeams.GetAllTeams().value

    Set the items property of dropdown2 to :

    MicrosoftTeams.GetChannelsForGroup(Dropdown1.Selected.id).value

    Set the items property of gallery1 to:

    MicrosoftTeams.GetMessagesFromChannel(Dropdown1.Selected.id,Dropdown2.Selected.id).value

    If you use label control, the app will return error . Because the returned message is a record value.

    You can use gallery control to display the message.

     

    regards

    eason

  • Stmorgan Profile Picture
    22 on at

    That worked! Thanks!

  • Stmorgan Profile Picture
    22 on at

    Thanks! I see the body of the messages that I post now but how can I see when someone replies to it? I don't see in the gallery where I can set anything to retrieve the replies. Thanks, for your help!

  • CU16040413-0 Profile Picture
    2 on at
    I have tried the solution provied that is
    MicrosoftTeams.GetMessagesFromChannel(Dropdown1.Selected.id,Dropdown2.Selected.id).value
    But this function only provide 8-10 latest post done on teams channel. But if I want all the post done in last 15days how to get those? Is there any way to get posts. Please provide me solution for that.


    Thanks 

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard