Is there is a way to update file properties in SharePoint using REST API

Lvov, Maksym 0 Reputation points
2024-01-11T15:22:44.76+00:00

Hello community,
I kindly require your help with one task I should resolve.
I want to change the file properties using the REST API method ValidateUpdateListItem(). I am using the following action after my file is Approved to change the file properties: 17b1d8a8-4989-46bd-ad34-4a291d6607cf

But my library settings have restrictions to making changes to files before you check out them, as shown below

5e2fa148-b70e-434e-a45e-2e83252c7442

When I tried to change the file properties using the action shown above I got the 502 error (The file Test1.docx is not checked out. You must first check out this document before making changes.) The main question is, is there any way to change the file properties without checking out/checking in the file and making changes to the file version? Thanks!

SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
10,588 questions
SharePoint Development
SharePoint Development
SharePoint: A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.Development: The process of researching, productizing, and refining new or existing technologies.
2,942 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. RaytheonXie_MSFT 35,066 Reputation points Microsoft Vendor
    2024-01-12T02:11:21.46+00:00

    Hi @Lvov, Maksym, As far as I know, there is no such way to update file version bypass the policy. The policy apply to every item to prevent file update without check out. It turns out to be a by-design one. The only way is to disable the policy.

    ---If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment". Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.