Closed
Description
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
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
- Add PeoplePicker control to a component
- Provide a webAbsoluteUrl value that points at a different site than the current one
- Set ensureUser={true}
- Attempt to search for users in the people picker