Skip to content

SharePoint — Update list item

Type: msfiles-update-list-item  ·  Package: OneDrive / SharePoint v1.0.5

Updates the fields of an existing SharePoint list item. It only changes the columns you give; the rest keep their value.

It works on the session created with OneDrive/SharePoint — Connect. Pass it in the session parameter, or place this activity inside the body of Connect to inherit it automatically.

Values follow the same rules as in Add list item (dates in ISO 8601, people and lookups through <Column>LookupId). null values are skipped, so they do not empty the column; to leave a text column empty, send "".

Applying the same values twice gives the same result, so it is safe to retry. SharePoint records every change as a new item version, with the connection’s account as author.

ParameterTypeDefaultDescription
liststring—Display name or ID of the list.
itemIdstring—List item ID.
fieldsDictionary—Values to update as { column: value }, with internal names. Must have at least one non-null value.
ParameterTypeDefaultDescription
sessionZoanMicrosoftFilesSession—Connect session. Inherited inside Connect’s body.

This activity does not return a value.

MessageCause and fix
No OneDrive/SharePoint session available. Provide 'session' from an msfiles-connect activity, or place this activity inside the Connect activity's body so the session is inherited automatically.The activity is outside Connect’s body and did not receive session. Place it inside the body or pass session = session.
This activity needs a SharePoint site. Set 'siteId' in the Connect activity.Connect was opened without siteId.
'list' is required. / 'itemId' is required.The parameter is empty or its expression returned null.
'fields' is required.fields is empty, all its values are null or it is not a dictionary.
itemNotFound (Microsoft Graph, 404)The list does not exist, or there is no item with that itemId (it may have been deleted).
invalidRequest (Microsoft Graph, 400)A column does not exist with that internal name, or a value does not have the expected format.
OneDrive/SharePoint — Connect credential = credential("m365-operations") siteId = siteId
└─ body:
SharePoint — Update list item list = "Requests" itemId = request["id"] fields = { "Status": "Resolved", "ClosedDate": DateTime.UtcNow.ToString("o") }