How to discard a checkout of SharePoint files

In a Windows project, I am using Microsoft Office 365 activities to process SharePoint files.
Is there a way to discard a checkout after checking out with the “Check In/Check Out File” activity?
Can this be substituted with check-in?

Hello

Unfortunately, there is no built-in activity for check-out discard in UiPath, so you will need to implement it through other means. If you check in, any changes made after check-out will be reflected, which is different from a discard operation. If you haven’t made any changes after check-out, checking in might suffice.

Other methods could include calling the check-out discard API using the Microsoft 365 HTTP Request or using UI operations as an alternative.

Since no changes have been made, it would be fine to just check in, but

during debugging execution in Studio, I checked out
→ it resulted in an error and remained checked out
→ before executing again, I tried to check in (using the activity)
→ but due to being in a checked-out state, it resulted in a check-in error.

Therefore, I wanted to ask if it’s possible to discard the checkout. The execution terminal and the user are all the same.

Hello

That’s strange. It seems that the person who checked out should be able to check in as well… Is it possible to perform the check-in operation from the browser?

I haven’t tried from the browser, but I was unable to check in from the Teams app as well. Therefore, I discarded the checkout from the Teams app.