I’m working on a robot that iterates through items in a SharePoint list and updates a single column. I am using the For Each List Item activity followed by the Update List Item activity.
The process fails with a generic invalidRequest error, even when I try to update just one column.
I have already done the following troubleshooting:
I confirmed that the robot has the necessary permissions. The Azure App Registration has Sites.ReadWrite.All.
I verified that the ListItem.Id is a valid number and not null.
I ensured that I’m only sending one field to be updated in the FieldValues property.
Here’s the configuration I’m using for the Update List Item activity:
ListItem: [ListItem]
FieldValues: New Dictionary(Of String, Object) From {{"column", "value"}}
I’m getting the error even when I remove all other fields. Can someone please help me understand what could be causing this persistent invalidRequest error? Is there something else I should be checking?
The invalidRequest error usually occurs when the column name in FieldValues is not the SharePoint internal name or when the value type doesn’t match the column type. Ensure you use the exact internal column name, match the data type (string, integer, choice object, etc.), and test first with a simple single-line text column to confirm the update works. Special column types like calculated, lookup, or managed metadata may require different formats.
The “invalidRequest” error in UiPath when updating an Office365 ListItem usually means there is a mismatch or invalid data in the request, such as an incorrect date or field value. To resolve this, verify that all field names and values match the expected format of your SharePoint or Office365 list, and ensure the date value is within a valid range. Also, check network connectivity and authentication details before retrying the operation
Yes, I checked. The column I want to update is a Choice type column. Do I need to change anything in the value? There are only two options. Another question: my list has 11 required columns. When I use the ‘Update List Item’ activity, can I update just the column I want, or do I have to update all 11?
For a Choice column, match the value exactly to one of the allowed options. When updating with ‘Update List Item’, you can update only the specific column you want—no need to update all 11 required columns if they already contain data.
ensure the value assigned to the Choice column exactly matches a valid option in SharePoint, including accents and spacing. Update only the target column using the ‘Update List Item’ activity by assigning:
ListItem.Fields.First(Function(f) f.FieldName = “StatusdeprocessamentoRPA”).Value = “Processado com Sucesso” .
Then call ‘Update List Item’ on that single updated item. This avoids invalid request errors and respects SharePoint Choice field constraints
if you are able to get a list item under your for each activity t hen column name you are using is right only as I can see you are using the same name for updating.
Could you please try using assign statement like below:
Listitem.Fields.Where(function(x) x.Name.Equals(“StatusdeprocessamentoRPA”))(0).Value = value to be assigned
Is there another activity to update this list item, like UiPathTeam.SharePoint.Activities, to perform this update? I’m a beginner in RPA development, so it would really help me
I would suggest trying to first try with syntax I shared above, it use it all the time to update list items at my end.
simply replace the below left part of assign activity with the one I have suggested above. Replace ListItem.Fields.First(Function(f) f.FieldName = “StatusdeprocessamentoRPA”).Value With Listitem.Fields.Where(function(x) x.Name.Equals(“StatusdeprocessamentoRPA”))(0).Value
Yes, there are other packages available to perform updates but the one you are using currently is supported by UiPath unlike UiPathTeam.SharePoint.Activities which is a marketplace package.
i can see you were able to fetch the value using the same syntax, so yes, this seems like a permission issue.
Can you try to put update list item activity in try catch and inside catch, print Exception.InnerException
may be that will give some details to the error.
Also, if you can share screenshot from your your azure’s app API permissions, that would be helpful to understand if this can be a permission issue or not.
Before going into the issue of the classic activity mentioned above, quick question:
Is there a specific reason why you are sticking to the classic Update List Item activity, instead of trying out the Update Single List Item modern O365 activity that works with Integration Service?
I quickly tried the scenario involving updating a single list item of the Choice type using the modern activities, and it seemed to have worked just fine:
For the record, it is possible to “bring your own app” to the integration service, which means that you can use your own app registration there as well.
Now, to the issue at hand. I think we need to double-check a few things:
That the app registration in Azure matches the configuration of the classic Microsoft 365 Scope.
→ Could you please share details about the configuration of both?
That the issue is present for all column types, not just the Choice one.
→ Could you please try updating a simple text column value to rule out any issues with the Choice column type specifically?
This robot is an older automation that I’m currently working on to improve. For now, I need to keep using the classic activity, because if I update the Office365 package I would have to reformat the whole process.
I also tried updating a simple text column and even just a line, but I still got the same “invalid request” error.
I’ve already contacted the person responsible for the robot’s permissions and I’m waiting for their feedback before I can share more details with you.
Thank you very much for all the support, I really appreciate the help from everyone and I hope we can solve this issue soon.