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 trying delete fi...
Power Automate
Suggested Answer

error trying delete file on onedrive

(0) ShareShare
ReportReport
Posted on by
Hello, I am having the problem that in PAD, I cannot delete a file from OneDrive because it tells me that the ID is invalid along with a 400 error, previously I was with my personal OneDrive account, now I change it to that of a client but It doesn't work, I can list the files, I can create but when I want to delete or move a file it tells me the same error (as I mentioned with my personal OneDrive it worked without problems before, the error occurs when it changes), any idea that I can do?
I have the same question (0)
  • Suggested answer
    VishnuReddy1997 Profile Picture
    2,656 Super User 2025 Season 2 on at
    Hey Hi,
     
    In PAD fro for Personal account onedrive there are different actions and for Business account onedrive ther are different actions use the respective actions.
     
    Please find the solution as shown in below image.
     
    Code:
    @@id: '/Desktop/Power Automate Desktop/Practice/Combine PDFS/Folder A'
    @@connectionDisplayName: 'Cr442c5_shared_onedriveforbusiness_90c6768d'
    External.InvokeCloudConnector Connection: '63ad7332-e258-4cfb-96b4-cfcd6b676935' ConnectorId: '/providers/Microsoft.PowerApps/apis/shared_onedriveforbusiness' OperationId: 'ListFolderV2' @id: $'''b!kCieVjV4o0KcBQEvV3bEKg_-wKO-IutGhaYqHBrcQPz2m5efRPiVQbGm7nlKzvdR.01D25J5SMW7IB27KP2LFCYGQAPPGOOT5GX''' @ListFolderV2Response=> ListFolderV2Response
    LOOP FOREACH CurrentItem IN ListFolderV2Response.value
        @@path: '%CurrentItem.Path%'
    @@connectionDisplayName: 'Cr442c5_shared_onedriveforbusiness_90c6768d'
    External.InvokeCloudConnector Connection: '63ad7332-e258-4cfb-96b4-cfcd6b676935' ConnectorId: '/providers/Microsoft.PowerApps/apis/shared_onedriveforbusiness' OperationId: 'GetFileContentByPath' @path: CurrentItem.Path @inferContentType: True @GetFileContentByPathResponse=> GetFileContentByPathResponse
        File.ConvertFromBinary BinaryData: GetFileContentByPathResponse File: $'''C:\\Users\\\Desktop\\Power Automate Desktop\\Practice\\Combine PDFS\\%CurrentItem.Name%''' IfFileExists: File.IfExists.Overwrite
    END
    
    # [ControlRepository][PowerAutomateDesktop]
    
    {
      "ControlRepositorySymbols": [],
      "ImageRepositorySymbol": {
        "Repository": "{\r\n  \"Folders\": [],\r\n  \"Images\": [],\r\n  \"Version\": 1\r\n}",
        "ImportMetadata": {},
        "Name": "imgrepo"
      },
      "ConnectionReferences": [
        {
          "ConnectorId": "/providers/Microsoft.PowerApps/apis/shared_onedriveforbusiness",
          "DisplayName": "Cr442c5_shared_onedriveforbusiness_90c6768d",
          "InternalId": "63ad7332-e258-4cfb-96b4-cfcd6b676935",
          "IsDisabled": false,
          "LogicalName": "Cr442c5_shared_onedriveforbusiness_90c6768deaeb42148068fc0fdc8e1b38",
          "IsEmbedded": false,
          "ConnectionName": "shared-onedriveforbu-6b580db1-68b7-489d-9b20-b1c7d33ac4f7",
          "ConnectionDisplayName": "vishnuReddy@acme.com"
        }
      ]
    }
    
     
     
    The different action for personal onedrive and business onedrive is as shown in below images.
     
     
    (Note:- if you got your solution you can mark as solution and gives kudos)
     
    Thanks & Regards
    Vishnu Reddy

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 503 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 321 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard