Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] PeoplePicker won't accept Multiple Users with the same name #2644

Closed
sionjlewis opened this issue Aug 2, 2023 · 4 comments
Closed
Labels
bug Something isn't working Needs: Triage 🔍

Comments

@sionjlewis
Copy link

sionjlewis commented Aug 2, 2023

Bug Description

When we attempted to add multiple users with the same name (Charlotte Coker was out test for this as there are 3 different users set up with her name) it fails to surface any user after the first when you search:

image

When we search the user (Charlotte) initially all three user accounts display in the search result but after selecting one and starting to search for the second no more return (as screenshotted)

To Reproduce
Steps to reproduce the behaviour:

  1. Go to Azure > Azure Active Directory (AAD) > Users
  2. Add three accounts with the same names and different email addresses, for example:
  1. Add a four account with the same first name, foe example:
  1. Open or create a simple webpart hosting a PeoplePicker control with the following properties"
    <PeoplePicker
    context={this.props.context}
    titleText="People Picker"
    personSelectionLimit={200}
    showtooltip={true}
    onChange={this._getPeoplePickerItems}
    showHiddenInUI={false}
    principalTypes={[PrincipalType.User, PrincipalType.SharePointGroup, PrincipalType.SecurityGroup]}
    resolveDelay={1000} />

Expected behavior
I would like to see two or more John Smiths added to the field.

Suggested Fix
I understand that displaying three [John Smiths] [John Smiths] [John Smiths] will introduce another issue. Which [John Smiths] am I looking at. I currently see two options:

  1. Include a tooltip for each Person displaying their email address e.g, john.smith.02@ildsnz.onmicrosoft.com
  2. Have an option to display Email Address(es) instead of Display Name(s)

Environment (please complete the following information):

  • OS: Windows 11
  • Browser: Chrome Version 115.0.5790.110 (Official Build) (64-bit) (and Edge)
  • Framework: SPFx 1.17.1, react 16.13.1, @pnp/spfx-controls-react 3.9.0, @pnp/spfx-property-controls 3.9.0, Node: >=16.13.0 <17.0.0
  • Context Microsoft Teams and SharePoint
@sionjlewis sionjlewis added bug Something isn't working Needs: Triage 🔍 labels Aug 2, 2023
@sionjlewis sionjlewis changed the title [BUG] PeoplePicker won't accept multiple users with the same name [BUG] PeoplePicker won't accept Multiple Users with the same name Aug 2, 2023
@sebastienlevert
Copy link
Contributor

Wow! This is a good catch and was definitely not in our test cases! I appreciate you logging the bug! We'll add it to the scope of our current sprint and see if we can fix it. Adding @yejuntak for design ideas around the multiple users dilemma (what do we show if 2 users with the same name are displayed).

It's interesting as this is a problem we ourselves have at Microsoft so I'd consider this one a P0. Thanks!

@sebastienlevert
Copy link
Contributor

We just found that you are not using the MGT people picker :) You are using the SPFx one. Please create the issue over there as we do not own this library. https://github.com/pnp/sp-dev-fx-controls-react

Closing for now.

@sionjlewis
Copy link
Author

Thank you Sébastien,
I have created a new issue here: pnp/sp-dev-fx-controls-react#1612

@NishkalankBezawada
Copy link

Thank you Sébastien,
I have created a new issue here: pnp/sp-dev-fx-controls-react#1612

PR opened fixing this issue: pnp/sp-dev-fx-controls-react#1620

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Needs: Triage 🔍
Projects
Archived in project
Development

No branches or pull requests

3 participants