Skip to content

UserName not present on external users #7011

@JakeStanger

Description

@JakeStanger

Target SharePoint environment

SharePoint Online

What SharePoint development model, framework, SDK or API is this about?

SharePoint REST API

Developer environment

Linux

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

  • FireFox: 88.0.1 (64-bit)

Describe the bug / error

Several external users are being returned with a null UserName field when expanding a Person list column for list items.

Due to #4478 when using multi-person fields this causes requests selecting the users to fail.

This seems to be affecting one tenant exclusively at the moment, who have ~4500 total users.

I have also noticed that for the OOTB list people picker, the user does not show up.

Steps to reproduce

  1. Create list with Person field
  2. Create item with external user in Person field (using API)
  3. Run the following:
await fetch("/_api/web/lists/getByTitle('YOUR TEST LIST')/items/getById(1)?$expand=Person&$select=Person/UserName", {
  headers: {
    accept: "application/json"
  }
}).then(r => r.json())
  1. Observe that the UserName field is null.

Expected behavior

The UserName field contains the user's login email address, much like it does for regular users.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:csom/rest/apiCategory: SharePoint Client Side Object Model SDK / REST APIstatus:to-be-reviewedIssue needs to be reviewed by Microsoft for additional follow up / review.type:archive-old-issueIssues which are closed as tool old for active worktype:bug-suspectedSuspected bug (not working as designed/expected). See “type:bug-confirmed” for confirmed bugs.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions