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

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group


Experience what’s next for Power Virtual Agents

See the latest Power Automate innovations, updates, and demos from the Microsoft Business Applications Launch Event.

New Super Users

Meet the Power Automate Super Users!

Many congratulations to the Season 1 2021 Flownaut Crew!

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Top Solution Authors
Users online (73,607)