Hi @Jul-9224
Per my test, I can reproduce your issue by following version setting in library setting
It will show This is the current published major version
like following
Then I run the flow, it will increase a version
After I run the flow again, the version stops increase, and shown as following
According to the test result, I feel regretful to inform you that it turns out to be a by-design one. Version history will increase 0.1 and the following update won't increase version with bNewDocumentUpdate
If you don't want any increase of version, I will suggest you to set Create major versions
Updating a list item in SharePoint Online without incrementing the version
I'm working on a project with Sharepoint Online and PowerAutomate, and I have a small issue that I would like to share with you, in order to find solutions or workarounds.
I have a PowerAutomate flow, which is run by a technical user (service account). This flow is triggered by an API call, with some parameters as : requestor user id (which is an existing user in the tenant of course), site id, list it, list item id. The flow retrieve a specific document in a document library (according to parameters passed through the API call) and, at the end of the flow, I would like to publish a major version of this document (check-out + check-in). This is working properly, but there is an issue : as the flow is run as a technical user, when the major version is published, the "Modified by" field is set to the name of the technical user, and not the name of the user which called the API.
I saw that it seems possible to make a call with the specific parameter
"bNewDocumentUpdate": true
to make an update without incrementing the version.
So, at the end of the flow I make the call as follow :
{
"formValues": [ {
"FieldName": "Editor",
"FieldValue": "[{'Key':'i:0#.f|membership|******@mytenant.onmicrosoft.com'}]"
}
],
"bNewDocumentUpdate": true
}
I make the following observations :
- If I make this call directly after the major version publishing, the "Modified by" field is well updated with my business user name, but the version is incremented : v2.0 --> call to update editor --> v2.1 which is not satisfactory for my use case
- If I make the same call on a minor version, the "Modified by" field is well updated with my business user name, and the version is not incremented : v2.4 --> call to upddate editor --> v2.4 as well
So, my questions are :
- How do you explain the fact that the same call produce two different behaviours depending of the version number when I make the call, and do you know a workaround to avoid incrementing the version number ?
- Do you have an other idea to troubleshoot this issue? DO you know if there is another way to publish a major version on behalf my business user, despite the fact that the PowerAutomate flow is run as a technical user
Many thanks for your help, and have a great day.
Microsoft 365 and Office SharePoint Development
Microsoft 365 and Office SharePoint For business Windows
Microsoft 365 and Office Development Microsoft 365 Publishing
-
RaytheonXie_MSFT 40,471 Reputation points Microsoft External Staff
2022-11-11T09:14:32.377+00:00
3 additional answers
Sort by: Most helpful
-
RaytheonXie_MSFT 40,471 Reputation points Microsoft External Staff
2022-11-09T03:17:43.94+00:00 Hi @Jul-9224
Per my test, I can update list item without version increase by following flow
And the version still keeps v3.0 after I updated the Editor.
Here is the steps I following. Please make a reference
https://www.youtube.com/watch?v=vHnyf_y62nQ
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.
-
Jul-9224 21 Reputation points
2022-11-09T05:58:15.683+00:00 @RaytheonXie_MSFT Same is not working on my side.
Did you try that ?
- Check out
- Check in
--> Major version : 16.0 on my snapshot - Update list item, with updating Editor field and "bNewDocumentUpdate": true
--> New minor version : 16.1 (I expected to stay at 16.0)
On my side, this flow produce this :
Many thanks for your feedback and your help.
-
Jul-9224 21 Reputation points
2022-11-10T05:51:57.61+00:00 Thanks @RaytheonXie_MSFT
Really strange, why does the version increase in my case ?
Do you know if it could be due by some technical user privileges ?