Shane Bartholomeusz

Geek and lover of all things tech related

Solved: Set SharePoint Person Field to Null in Power Automate

Problem

Whilst trying to update a SharePoint Online List Item through Power Automate I noticed that I was unable to clear a Person field within a given List Item.

After some research it turns out that the Power Automate SharePoint Online connector currently does not support this operation when performing an ‘update’ operation.

In this post I’ll explain the solution that I found, and ultimately ended up using.

Power Automate Logo

Solution

You can reset the Person field within the List Item by directly interacting with the SharePoint Rest API. Here’s how you do it…

Step 1.
First we need to get ListItemEntityTypeFullName value for the List Item which will be required in the next step when interacting with the API.

The easiest way is to navigate to the following URL within your web browser:
<SHAREPOINT SITE ROOT>/_api/web/lists/getbytitle(‘<LIST NAME>’)ListItemEntityTypeFullName

For example:
https://mysharepointsite.sharepoint.com/sites/hr/_api/web/lists/getbytitle(‘TestList’)/ListItemEntityTypeFullName

SharePoint REST API screenshot

Step 2.
Add the ‘Send an HTTP request to SharePoint’ connector to your workflow. This connector will allow you to interact directly with the SharePoint API to reset the Person field.

URI: _api/web/lists/GetByTitle(‘TestList’)/items()

Headers:
  Accept: application/json;odata=verbose
  IF-MATCH: *
  X-HTTP-Method: PATCH
  Content-Type: application/json;odata=verbose

Body:
  {
  "__metadata": {‘type":""},
  "fieldnameStringId":”,
  "fieldnameId":-1
  }
Power Automate SharePoint REST API screenshot

Final Thoughts

I hope this solution has helped. Should you find an alternative solution, feel free to post it below to help others out there.

Happy Power-Automating!

Shane Bartholomeusz

2 Comments

  1. Cool thanks.
    The url seems wrong in the text but your screenshot shows correct value for testing.
    https://XXXX.sharepoint.com/sites/###SITENAME####/_api/web/Lists/GetByTitle('###LISTNAME###‘)/ListItemEntityTypeFullName

    In the blog you omitted both “/web/” and haven’t removed the “$select=” as you have in screenshot. Thanks anyway 🙂 still it helped!

Leave a Reply

© 2024 Shane Bartholomeusz

Theme by Anders NorenUp ↑