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 Automate / Error using "Get file ...
Power Automate
Answered

Error using "Get file metadata" Onedrive Connector

(1) ShareShare
ReportReport
Posted on by 20
Hello everyone! I've had a flow setup for about 3 years now, and (after A LOT of work) I got it to work smoothly, without major issues since I completed it.
 
The thing is that for some unknown reason the flow suddenly stopped working yesterday, due to an error in a "Get file metadata" Onedrive Connector nested inside a "Apply to each" loop. The connector cant seem to locate the files anymore.
 
The files in question are received via Microsoft Forms. I use a "Parse JSON" action to set the stage for the "Apply to Each" loop.
For each iteration of the loop (that runs between 1 to 10 times, depending on the ammount of files attached to the answer to the form question), one of the actions I run is the "Get file metadata", that provides me with the variables to allow me to manipulate the files, renaming them, relocation them, etc...
 
The flow goes as follows:
 
 
This setup used to work for the last 3 years, but since yesterday the "Get file metadata" Onedrive Connector started presenting the following error:
 
 
 
In the "Get file metadata" Onedrive Connector I use the "driveId.id" path, that I obtain from parsing the JSON using the following schema:
 
{
    "type""array",
    "items": {
        "type""object",
        "properties": {
            "name": {
                "type""string"
            },
            "link": {
                "type""string"
            },
            "id": {
                "type""string"
            },
            "type": {},
            "size": {
                "type""integer"
            },
            "referenceId": {
                "type""string"
            },
            "driveId": {
                "type""string"
            },
            "status": {
                "type""integer"
            },
            "uploadSessionUrl": {}
        },
        "required": [
            "name",
            "link",
            "id",
            "type",
            "size",
            "referenceId",
            "driveId",
            "status",
            "uploadSessionUrl"
        ]
    }
}
 
As the flow previously ran smoothly for 3 years, i thought it might be some instability issue and tried waiting it out, but its been over 24h now and it hasn't gotten any better. I am kind of out of ideas, as I am sure my setup used to work for a very long time. I am also sure that no changes were made to the flow.
 
I would really appreciate any thoughts or ideas for what can I try to do to solve this.
 
Thanks in advance!
 
Categories:
I have the same question (5)
  • Michael E. Gernaey Profile Picture
    53,604 Super User 2025 Season 2 on at
     
    Can you click the Download for Outputs and see what is there.
     
    Normally I would go to changes in the data location
     
    I realize you do not have this there, but it would be interesting if you tried using Get Metadata using file path instead just as a test.
     
     
  • CU20081731-1 Profile Picture
    20 on at
    Thanks for the reply Michael!
     
    You've given a great suggestion, for me to try to provide the filepath to obtain the metadata, instead of the "driveid.id" thing.
    As you mentioned, I dont have the path prior to the forms submission, but just out of curiosity I created a mock flow and provided the file path to a file sent via the form. It worked alright, so the problem seems to be elsewhere...
     
    Regarding your other suggestion, here are the contents of the download Output, which I am having a really hard time understanding what they mean. I really appreciate you taking the time to help.
     
    {"statusCode":404,"headers":{"Cache-Control":"max-age=0, private","Vary":"Origin","X-NetworkStatistics":"0,4194720,0,0,12,18682,18682,898","X-SharePointHealthScore":"3","X-MS-SPConnector":"1","X-SP-SERVERSTATE":"ReadOnly=0","DATASERVICEVERSION":"3.0","SPClientServiceRequestDuration":"237","IsOCDI":"0","X-DataBoundary":"NONE","X-1DSCollectorUrl":"https://mobile.events.data.microsoft.com/OneCollector/1.0/","X-AriaCollectorURL":"https://browser.pipe.aria.microsoft.com/Collector/3.0/","SPRequestGuid":"cf4fbda1-a020-9000-9b22-50f292553720","request-id":"cf4fbda1-a020-9000-9b22-50f292553720","MS-CV":"ob1PzyCgAJCbIlDyklU3IA.0","SPLogId":"cf4fbda1-a020-9000-9b22-50f292553720","Alt-Svc":"h3=\":443\"","Strict-Transport-Security":"max-age=31536000","X-Frame-Options":"SAMEORIGIN","Content-Security-Policy":"frame-ancestors 'self' teams.microsoft.com *.teams.microsoft.com *.skype.com *.teams.microsoft.us local.teams.office.com teams.cloud.microsoft *.office365.com goals.cloud.microsoft *.powerapps.com *.powerbi.com *.yammer.com engage.cloud.microsoft word.cloud.microsoft excel.cloud.microsoft powerpoint.cloud.microsoft *.officeapps.live.com *.office.com *.microsoft365.com m365.cloud.microsoft *.cloud.microsoft *.stream.azure-test.net *.dynamics.com *.microsoft.com onedrive.live.com *.onedrive.live.com securebroker.sharepointonline.com;","MicrosoftSharePointTeamServices":"16.0.0.26406","X-Content-Type-Options":"nosniff","X-MS-InvokeApp":"1; RequireReadOnly","P3P":"CP=\"ALL IND DSP COR ADM CONo CUR CUSo IVAo IVDo PSA PSD TAI TELo OUR SAMo CNT COM INT NAV ONL PHY PRE PUR UNI\"","X-AspNet-Version":"4.0.30319","X-Powered-By":"ASP.NET","x-ms-client-region":"southamerica","x-ms-flavor":"Production","X-Ms-Workflow-Resourcegroup-Name":"selfhostingresourcegroup","x-ms-workflow-subscription-id":"Default-c3ffbd20-cdc8-470d-81e8-14c97906b2b4","x-ms-environment-id":"default-c3ffbd20-cdc8-470d-81e8-14c97906b2b4","x-ms-tenant-id":"c3ffbd20-cdc8-470d-81e8-14c97906b2b4","x-ms-subscription-id":"Default-c3ffbd20-cdc8-470d-81e8-14c97906b2b4","x-ms-dlp-re":"-|-","x-ms-dlp-gu":"-|-","x-ms-dlp-ef":"-|-/-|-|-","x-ms-mip-sl":"-|-|-|-","x-ms-au-creator-id":"26decf68-b97a-4815-ab0c-dce8fac1b6a8","Timing-Allow-Origin":"*","x-ms-apihub-cached-response":"false","x-ms-apihub-obo":"false","Date":"Tue, 19 Aug 2025 14:51:14 GMT","Content-Length":"178","Content-Type":"application/json","Expires":"Mon, 04 Aug 2025 14:51:14 GMT","Last-Modified":"Tue, 19 Aug 2025 14:51:14 GMT"},"body":{"status":404,"message":"File or folder not found\r\nclientRequestId: c4ec59a9-2586-4ef4-a19c-de68f1aaf452\r\nserviceRequestId: cf4fbda1-a020-9000-9b22-50f292553720"}}
  • Michael E. Gernaey Profile Picture
    53,604 Super User 2025 Season 2 on at
     
    Let me download and look at it.
     
    UGG omg that new Copilot summary is driving me bonkers.. just adds MORE scrolling lol to hit reply.
     
    Give me a moment
  • Suggested answer
    Michael E. Gernaey Profile Picture
    53,604 Super User 2025 Season 2 on at
     
    So, absolutely without a doubt, something changed in the 
     
    Question: You said nothing changed, but why are you using the following
     
    Why are you concatenating driveid and . and id?, this should only be the File Id itself nothing else. You look like you are typing a file with an extension. So I would not expect that to work as 
     
    In there i only expect you to have the Id thats it
     
    So for instance in my simple flow.
     
    Manual Run
    List folders
    Apply to each
    inside get the files Metadata where I am using the files Id from the Apply to each which got its data from List files in a folder.
     
    What you have should not work unless you are putting in a path, but you are using.... the Id's which is not right.
     
    If you wanted to use the Folder Id, (primary) that is per se ok but the rest would be the file path, but not a number.number
     
     
    I am surprised this has possibly worked for 3 years and no one changed it recently as that code won't work.

    If these suggestions help resolve your issue, Please consider Marking the answer as such and also maybe a like.

    Thank you!
    Sincerely, Michael Gernaey
  • CU20081731-1 Profile Picture
    20 on at
    Hey Michael, thanks for the insights. I admit that I am not a programmer and that 100% of what I know about powerautomate I leaned by watching videos and reading forums. So I have a very limited grasp on the tools involved.
     
    I honestly have no idea why the driveId.Id thing works, but it does.
    Although it is not the video I learned it from, I found the following video showcasing it (06:02):
     
    I will duplicate the flow to have a backup and try to make changes to it following your suggestions.
     
    Hopefully the video can shed some light on the driveid.id thing, allowing you to provide further insight on the problem.
     
    Thanks again!
  • CU20081731-1 Profile Picture
    20 on at
    Michael, to further demonstrate the driveId.Id method, here is a print from a flow run from 3 days ago, just before it broke....
     
     
    The full Id provided in the Get File metadata action was:
    "b!EGxVFP6Lwkeq5c311JtiZLtVl2i3UKFNpf-zAVmLaIbAjCQ43oE1QIpxk2Wsmc-1.01XGCLA52KFR3A6RFWVFELC4ELCAZK6G5L"
     
    This way, it stands to reason that the concatenation of driveId.Id works just fine (or at least used to work until 2 days ago...)
  • AC-22081758-0 Profile Picture
    4 on at
    I was using the exact same method and it also stopped working about 2 days ago.
     
    In my case, the owner of the Onedrive is not the user used in the Flow connections, but the onedrive folder is shared with that user.
     
    Documents come in from a Forms into OneDrive and the flow is exactly the same as shown in the initial post.
     
    Parse JSON on the files - Apply to Each on the "Body" - Get File Metadata on "driveid"."id"
  • Verified answer
    CU20081731-1 Profile Picture
    20 on at
    Thank you for sharing you were affected too, as I was concerned it might be smth licence related...
     
    So, it turns out that the solution came on its own. The flow, misteriously works again, and all is good again.
     
    I could not implement the changes suggested by Michael, but I sebubmitted previous failed runs and now they work.
     
    Thak you again Michael and  for your time!

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 Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 255 Super User 2025 Season 2

#2
David_MA Profile Picture

David_MA 169 Super User 2025 Season 2

#3
harshdeol Profile Picture

harshdeol 167 Moderator

Last 30 days Overall leaderboard