SharePoint / SharePoint/sp-dev-docs
Person or Group column throws error when selected user has null email
@Ashlesha-MSFT is already working on this.
Since Jan 2, 2026.
- Dominant language
- PowerShell
- Stars
- 1.4k
- Forks
- 1.1k
- Avg merge
- 4d 12h
- Merged PRs (30d)
- 12
Description
Target SharePoint environment
SharePoint Online
What SharePoint development model, framework, SDK or API is this about?
💥 SharePoint Framework
Developer environment
Windows
What browser(s) / client(s) have you tested
- 💥 Internet Explorer
- 💥 Microsoft Edge
- 💥 Google Chrome
- 💥 FireFox
- 💥 Safari
- mobile (iOS/iPadOS)
- mobile (Android)
- not applicable
- other (enter in the "Additional environment details" area below)
Additional environment details
- browser version - 143.0.7499.170
- SPFx version - 1.21.1
- Node.js version - 22.14.0
Describe the bug / error
The request fails with the following error:
Cannot get value for projected field TeamMember_x005f_EMail
This issue prevents retrieving list data when any selected user does not have an email address, impacting scenarios where service accounts, guest users, or incomplete profiles are used.
Steps to reproduce
We have created a Person or Group column in a SharePoint list that allows multiple user selections.
While retrieving list items using PnPjs, the query works correctly when all selected users have an email address.
However, if any selected user does not have an email populated, the request fails with an error.
import { spfi, SPFx } from "@pnp/sp";
import "@pnp/sp/lists";
import "@pnp/sp/items";
import "@pnp/sp/site-users/web";
const sp = spfi().using(SPFx(this.context));
const items = await sp.web.lists
.getByTitle("Projects")
.items.select(
"Id",
"Title",
"TeamMember/Id",
"TeamMember/Title",
"TeamMember/EMail"
)
.expand("TeamMember")();
console.log(items);
- Create a SharePoint list with a Person or Group column that allows multiple selections.
- Select at least one user whose email address is null or not populated.
- Execute the above PnPjs query to retrieve list items.
Expected behavior
The query should return user details and handle users without an email address gracefully (e.g., return null for the email field).
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.