Skip to content

PeoplePicker returns no results with webAbsoluteUrl and ensureUser #1669

Closed
@argofgra

Description

@argofgra

Category

[ ] Enhancement

[X] Bug

[ ] Question

Version

Please specify what version of the library you are using: [ 3.15.0 ]

Expected / Desired Behavior / Question

When setting webAbsoluteUrl prop to a different site and setting ensureUser = true results are expected to be returned.

Observed Behavior

No results are returned.
image

If both the webAbsoluteUrl prop is pointing to a different site than the current one, and ensureUser is set to true, no results are returned in the picker. Instead, the console shows the error: PeopleSearchService::searchTenant: error occured while fetching the users.

A deeper error says Cannot read properties of undefined (reading 'push'), which I've tracked down to PeopleSearchService.ensureUser:295. The object cachedLocalUsers assumes it already contains the webAbsoluteUrl as a key but it does not.

Steps to Reproduce

  1. Add PeoplePicker control to a component
  2. Provide a webAbsoluteUrl value that points at a different site than the current one
  3. Set ensureUser={true}
  4. Attempt to search for users in the people picker

Metadata

Metadata

Labels

status:fixedIssue fixed in current or prior release.type:bug

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions