Live training: next batches coming soon. Join the waitlist:Waitlists open:Developer Training →Developer →Copilot Studio Training →Copilot Studio →

How to Update a Person Field Using PnP PowerShell (Single, Multi and Groups)

To update a person field with PnP PowerShell, pass the user’s email to Set-PnPListItem -Values, keyed by the column’s internal name. For a multi-person column, pass an array of emails instead of one string.

Set-PnPListItem -List "SPGDemo Equipment" -Identity 3 -Values @{
    AssignedTo = "miller@spguides.onmicrosoft.com"
}

That sets Assigned To on item 3 to one user. PnP resolves the email to the user’s ID in the site for you.

In this tutorial, we’ll cover every pnp powershell update person field case I tested on a real list: one person, many people, users who never visited the site, SharePoint groups, clearing the value, CSV bulk updates and the errors you’ll hit.

What values does a person field accept?

The same -Values hashtable you use for other list item updates with PnP PowerShell works here. Connect first:

Connect-PnPOnline -Url "https://spguides.sharepoint.com/sites/SPGuides" -ClientId "<your-client-id>" -Interactive

A person or group column then takes any of these:

You passExampleResult
Email"miller@spguides.onmicrosoft.com"Resolved with EnsureUser (best choice)
Claims login name"i:0#.f|membership|miller@spguides.onmicrosoft.com"Same user
Site user ID26Used as is (ID from the site’s User Information List)
SharePoint group ID31Only if the column allows groups
Array@("a@...", "b@...")Several people (multi-person columns)
$null$nullClears the field

Always use the internal name, such as AssignedTo, not the display name. Here’s how to find a column internal name with PnP PowerShell.

Update a single person field by email

My sample list, SPGDemo Equipment, has a people-only column called Assigned To. This script sets it and reads it back:

Set-PnPListItem -List "SPGDemo Equipment" -Identity 3 -Values @{
    AssignedTo = "miller@spguides.onmicrosoft.com"
} | Out-Null

$item = Get-PnPListItem -List "SPGDemo Equipment" -Id 3
$user = $item["AssignedTo"]
"LookupId   : " + $user.LookupId
"LookupValue: " + $user.LookupValue
"Email      : " + $user.Email
PnP PowerShell Set-PnPListItem updating a single person field by email and reading it back

The value comes back as a FieldUserValue object. LookupId is the user’s ID in this site (26), LookupValue is the display name, and Email is the address.

Update a multi-person field with several users

The Reviewers column allows multiple selections. Pass a PowerShell array:

Set-PnPListItem -List "SPGDemo Equipment" -Identity 3 -Values @{
    Reviewers = @(
        "user1@spguides.onmicrosoft.com",
        "user2@spguides.onmicrosoft.com"
    )
} | Out-Null

$item = Get-PnPListItem -List "SPGDemo Equipment" -Id 3
$item["Reviewers"] | Select-Object LookupId, LookupValue, Email | Format-Table -AutoSize
PnP PowerShell updating a multi-person SharePoint column with an array of user emails

Both users landed in the field, with IDs 13 and 14. Note that this replaces whatever was in Reviewers before.

What if the user isn’t in the site yet?

The PnP docs say to add a missing user with New-PnPUser first. In PnP PowerShell 3.3.0, I didn’t need to. Sarah had never been added to my site, and the update still worked:

$email = "sarah@spguides.onmicrosoft.com"

$before = Get-PnPUser | Where-Object Email -eq $email
"In the site before: " + [bool]$before

Set-PnPListItem -List "SPGDemo Equipment" -Identity 4 -Values @{ AssignedTo = $email } | Out-Null

$after = Get-PnPUser | Where-Object Email -eq $email
"In the site after:  " + [bool]$after + " (Id " + $after.Id + ")"
Setting a person field to a user who is not yet in the SharePoint site with PnP PowerShell

Behind the scenes, PnP calls EnsureUser for any email. That added Sarah to the site’s User Information List with ID 32, and then set the field.

Want the user added up front, for example to check the ID? Run this. It doesn’t grant access; see how to get SharePoint site members for real membership:

New-PnPUser -LoginName "sarah@spguides.onmicrosoft.com"

Set a person field to a SharePoint group

A group only works when the column’s Allow selection of setting is People and Groups. I created Reviewers that way; customizing list fields with PnP PowerShell covers more column options:

Add-PnPFieldFromXml -List "SPGDemo Equipment" -FieldXml '<Field Type="UserMulti" Name="Reviewers" StaticName="Reviewers" DisplayName="Reviewers" Mult="TRUE" UserSelectionMode="PeopleAndGroups" />'

Now pass the group’s ID, not its name:

$group = Get-PnPGroup -Identity "SPGDemo Approvers"

Set-PnPListItem -List "SPGDemo Equipment" -Identity 5 -Values @{
    Reviewers = @("user1@spguides.onmicrosoft.com", $group.Id)
} | Out-Null
PnP PowerShell setting a SharePoint group and a user in a person or group column by group ID

SPGDemo Approvers (ID 31) sits next to User1. Its Email is empty, which is normal for a SharePoint group.

Add a person without removing the existing ones

Because an array replaces the field, read the current IDs first and add the new one:

$list = "SPGDemo Equipment"
$item = Get-PnPListItem -List $list -Id 5

# Keep the current people (by LookupId) and add one more
$ids = @($item["Reviewers"] | ForEach-Object { $_.LookupId })
$new = Get-PnPUser | Where-Object Email -eq "miller@spguides.onmicrosoft.com"
if ($ids -notcontains $new.Id) { $ids += $new.Id }

Set-PnPListItem -List $list -Identity 5 -Values @{ Reviewers = $ids } | Out-Null
Appending a user to a multi-person field without overwriting existing reviewers in PnP PowerShell

Reviewers went from “User1, SPGDemo Approvers” to “User1, SPGDemo Approvers, Miller”. The group stays because its ID is kept.

How do you clear a person field?

Set it to $null. This works for single and multi-person columns:

Set-PnPListItem -List "SPGDemo Equipment" -Identity 4 -Values @{
    AssignedTo = $null
    Reviewers  = $null
}
Clearing single and multi-person SharePoint fields with $null in PnP PowerShell

Both checks return True. An empty string ("") clears the field too.

Bulk update person fields from a CSV file

For many items, keep one row per item. I separate multiple reviewers with a semicolon, because the CSV already uses commas:

ItemId,AssignedTo,Reviewers
6,miller@spguides.onmicrosoft.com,user1@spguides.onmicrosoft.com;user2@spguides.onmicrosoft.com
7,user1@spguides.onmicrosoft.com,miller@spguides.onmicrosoft.com
8,user2@spguides.onmicrosoft.com,

Then split the reviewers into an array and send everything in one batch:

$rows  = Import-Csv -Path "C:\SPGuidesDemo\equipment-people.csv"
$batch = New-PnPBatch

foreach ($row in $rows) {
    $values = @{ AssignedTo = $row.AssignedTo }
    $values.Reviewers = if ($row.Reviewers) { @($row.Reviewers -split ";") } else { $null }
    Set-PnPListItem -List "SPGDemo Equipment" -Identity $row.ItemId -Values $values -Batch $batch
}
Invoke-PnPBatch -Batch $batch
Bulk updating SharePoint person fields from a CSV file with New-PnPBatch in PnP PowerShell

All five items updated, and item 8’s blank Reviewers cell cleared that field. Batching matters on large lists; here’s how I work with more than 5,000 items in PnP PowerShell.

Common errors when updating a person field

I reproduced each of these on the demo list:

Common PnP PowerShell person field errors: user could not be found and column does not exist
  • The specified user SPGDemo Approvers could not be found: you passed a group name. Pass (Get-PnPGroup "name").Id.
  • The specified user could not be found (blank name): a group ID went into a people-only column. Change the column to People and Groups.
  • The specified user nobody@… could not be found: a typo, or the account doesn’t exist in Microsoft Entra ID.
  • Comma-separated string fails: "a@...,b@..." is read as one user. Use @("a@...", "b@...").
  • Column ‘Assigned To’ does not exist: you used the display name. Use the internal name.
  • Version conflict: another script or user saved the item at the same moment. Run the update again.

If Connect-PnPOnline itself fails, start with connecting to SharePoint Online with PowerShell.

Working with SharePoint list data from PowerShell? These go well with this one:

Frequently Asked Questions

How do I update a person field in SharePoint using PnP PowerShell?

Run Set-PnPListItem -List "ListName" -Identity 1 -Values @{AssignedTo = "user@domain.com"} with the column’s internal name. The Set-PnPListItem reference lists every value type it accepts.

Do I need New-PnPUser before setting a person field?

Not in PnP PowerShell 3.x. When you pass an email or login name, PnP calls EnsureUser, which adds the user to the site’s User Information List. New-PnPUser is still handy when you want the user’s site ID first.

Why does my multi-person field keep only one user or fail?

You probably passed one comma-separated string. PowerShell sends that as a single user name. Pass an array such as @(“a@domain.com”, “b@domain.com”) instead.

Can I use a display name instead of an email?

It worked in my test, because EnsureUser resolved the name. But two people can share a display name, so use the email or login name in scripts.

How do I read the email from a person field in PnP PowerShell?

Read $item[“FieldName”].Email after Get-PnPListItem. A multi-person field returns several values, each with LookupId, LookupValue and Email.