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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / MS Power Automate Desk...
Power Automate
Answered

MS Power Automate Desktop: cannot access property "attachments" from the output of Teams "Get message details"

(0) ShareShare
ReportReport
Posted on by 13

In my Power Automate Desktop I invoke "Get message details" to receive details of Teams message and store output into variable MessageDetails.

I can inspect the content of flow variable MessageDetails, and I see the list "attachments" as one of properties.

However, when I try to use MessageDetails, for example, in "For each" statement, I cannot see "attachments" in the list of available properties. If I enter %MessageDetails.attachments% manually, I get the error that "Variable MessageDetails does not have a property attachments".

How do I access property attachments of the Connector object MessageDetails returned from Teams message "Get message details" step?  

 

mgubko_0-1717425695508.png

 

I have the same question (0)
  • Deenuji_Loganathan_ Profile Picture
    6,255 Moderator on at

    @mgubko 

     

    If possible could you pls share screenshot of your flow after hiding all sensitive info? 

  • mgubko Profile Picture
    13 on at

    Thanks for the fast answer. Post updated, screenshot added.

  • Deenuji_Loganathan_ Profile Picture
    6,255 Moderator on at

    @mgubko 

     

    There appears to be a bug in the "get message details" action as it doesn't display the attachments property. Please report this issue with microsoft.

     

    However, another workaround is as follows: Instead of using "Get message details," utilize "Get messages." Then, using a for-each loop, you can apply the necessary filters using an if condition (if required), and you'll obtain a list of attachments. This approach will display all attachment names individually.

    However, neither "Get message details" nor "Get messages" returns the content data of attachments.

     

    Deenuji_0-1717426507677.png

     

     


    Thanks,
    Deenuji Loganathan 👩‍💻
    Automation Evangelist 🤖
    Follow me on LinkedIn 👥

    -------------------------------------------------------------------------------------------------------------
    If I've helped solve your query, kindly mark my response as the solution ✔ and give it a thumbs up!👍 Your feedback supports future seekers 🚀

  • mgubko Profile Picture
    13 on at

    @Deenuji, thanks a lot. The workaround you suggested helps, but then a similar bug appears on the next step:

    1. I initialize LatestMessage to the 1st element the list of all messages.

    2. Now I can iterate for each attachment in LatestMessage.attachments.

    3. But when I want to use the content of attachment, the flow does not see its property contentURL.

    4. As before, in the inspector window I can see all properties.

     

    Any idea how to access the properties of attachment?

     

    mgubko_0-1717431750314.png

     

  • Verified answer
    Deenuji_Loganathan_ Profile Picture
    6,255 Moderator on at

    @mgubko 

     

    Seems like a bug in teams cloud package. that's why I mentioned this point in my previous point as well.

     

    "However, neither "Get message details" nor "Get messages" returns the content data of attachments."

     

    It will just return the file name that's it. not able to get the content data using those actions. please feel free to raise this issue with Microsoft.

     


    Thanks,
    Deenuji Loganathan 👩‍💻
    Automation Evangelist 🤖
    Follow me on LinkedIn 👥

    -------------------------------------------------------------------------------------------------------------
    If I've helped solve your query, kindly mark my response as the solution ✔ and give it a thumbs up!👍 Your feedback supports future seekers 🚀

  • mgubko Profile Picture
    13 on at

    Thanks for helping, @Deenuji , but even raising a bug to Microsoft raises a bug for me (updated app this morning 😀)

     

    mgubko_0-1717435737121.png

     

  • mgubko Profile Picture
    13 on at

    In fact, the hack is to convert attachment to JSON and then ingest URL using text functions. But this is, of course, weird.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 816

#2
Valantis Profile Picture

Valantis 603

#3
Haque Profile Picture

Haque 566

Last 30 days Overall leaderboard