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 / Checking out files in ...
Power Automate
Unanswered

Checking out files in flow with Powerapps trigger executes in flow, but does not check file out.

(0) ShareShare
ReportReport
Posted on by 2
Hey there
 
I am trying to check out a file in the context of an approval flow (so the document is checked out until it has been either approved / rejected). 
 
I have tried both with the regular "Check out file" action, as well as the SharePoint HTTP action. 
 
In my trouble shooting i tried to create a manual flow that executed the HTTP action statically towards the document. This worked fine and resulted in the document getting checked out in the SharePoint UI as well: 
  
 
Here is the input for the test (manual) flow: 
{
    "host": {
        "connectionReferenceName": "shared_sharepointonline",
        "operationId": "HttpRequest"
    },
    "parameters": {
        "dataset": "https://xxx.sharepoint.com/sites/WP365_8/Instruks3",
        "parameters/method": "PATCH",
        "parameters/uri": "_api/web/getFileByServerRelativeUrl('/sites/WP365_8/Instruks3/Documents/Document.docx')/CheckOut",
        "parameters/headers": {
            "accept": "application/json;odata=verbose",
            "content-type": "application/json;odata=verbose"
        }
    }
}
 
 
The action in my workflow is identical to this one, and executes fine in the run, but the document is never checked in the SharePoint UI (and i am able to edit etc. with other accounts as well, so its not truly checked out): 
 
 
Here is the input for the actual workflow: 
 
{
    "host": {
        "connectionReferenceName": "shared_sharepointonline",
        "operationId": "HttpRequest"
    },
    "parameters": {
        "dataset": "https://xxxx.sharepoint.com/sites/WP365_8/Instruks3",
        "parameters/method": "PATCH",
        "parameters/uri": "_api/web/getFileByServerRelativeUrl('/sites/WP365_8/Instruks3/Documents/Document.docx')/CheckOut",
        "parameters/headers": {
            "accept": "application/json;odata=verbose",
            "content-type": "application/json;odata=verbose"
        }
    }
}
 
 
As you can see theyre identical. My current theory is that it has to do with the flow being triggered by a powerapp (and that this somehow messes up the "context" in which SharePoint has to check out the document). 
 
Has anyone experienced this problem before? 
Any help appreciated!
 
Categories:
I have the same question (0)
  • David_MA Profile Picture
    14,605 Super User 2026 Season 1 on at
    This is how I configure the HTTP request to check out the document:
     
    The variable for the relative path is just this portion of your site address: /sites/sitename/
     
    This is the Uri: /_api/web/GetFileByServerRelativeUrl('@{variables('RelativePath')}@{triggerOutputs()?['body/{FullPath}']}')/CheckOut()
     
  • SS-03021339-0 Profile Picture
    2 on at
    As far as i understand your build up of the full url is the same as mine, with the exception that im targeting a site within a site collection ('/sites/{sitecollection}/{site}/{document library}/{document title}.docx')
     
    What i dont understand is why is works perfectly fine with the manual trigger, but not with the PowerApps V2 trigger.
     
    I tried using the full path variable from the document in question, but it ultimately gives me the same path if i choose to split it up into site path / library path:
     
    '/sites/WP365_8/Instruks3/Documents/Final Demand for Payment.docxDocuments/Final Demand for Payment.docx')/CheckOut()
     

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 801

#2
Valantis Profile Picture

Valantis 602

#3
Haque Profile Picture

Haque 581

Last 30 days Overall leaderboard