Showing results for 
Search instead for 
Did you mean: 
New Member

get file metadata in flow cannot be used with fileid, internally reverting to "get file metadata using path"



I'm trying to get the metadata for a file by file id but my flow kept on failing with odd errors ("file /19 does not exist"). Looking into the issue I thought it was odd that the Get File Metadata action has a folder symbol on the right. I then tried to use the "Get File Metadata using path" action instead and noticed it is identical, except for the label at the identified. The peek code feature however shows the same command is being used, and the file id is actually being supplied as path command, hence it fails. The peek code content is below, but it doesn't allow me to edit so I believe this is a bug.





    "inputs": {
        "host": {
            "connection": {
                "name": "@json(decodeBase64(triggerOutputs().headers['X-MS-APIM-Tokens']))['$connections']['shared_sharepointonline']['connectionId']"
        "method": "get",
        "path": "/datasets/@{encodeURIComponent(encodeURIComponent('https://...'))}/files/@{encodeURIComponent(triggerBody()?['entity']?['FileId'])}",
        "authentication": {
            "type": "Raw",
            "value": "@json(decodeBase64(triggerOutputs().headers['X-MS-APIM-Tokens']))['$ConnectionKey']"
    "metadata": {
        "flowSystemMetadata": {
            "swaggerOperationId": "GetFileMetadata"
Community Support
Community Support

Hi @Andy7 ,


Could you share a screenshot of the Flow configuration?

Basically, we can use these two actions with the configuration shown below:


I did the test on my side, they are all work.

Please provide more details and we would provide proper workaround for you.


Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

May UG Leader Call Carousel 768x460.png

June User Group Leader Call

Join us on June 28 for our monthly User Group leader call!

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Power Automate Designer Feedback_carousel.jpg

Help make Flow Design easier

Are you new to designing flows? What is your biggest struggle with Power Automate Designer? Help us make it more user friendly!

Top Solution Authors
Top Kudoed Authors
Users online (1,406)