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

In People Picker , can we change default behavior to get only users #94

Closed
harshdamaniahd opened this issue Jul 13, 2018 · 4 comments
Closed
Assignees
Milestone

Comments

@harshdamaniahd
Copy link

Currently if i make groupName as empty

<PeoplePicker
    context={this.props.context}
    titleText="People Picker"
    personSelectionLimit={3}
    groupName={''} // Leave this blank in case you want to filter from all users
    showtooltip={true}
    isRequired={true}
    disabled={true}
    selectedItems={this._getPeoplePickerItems} />

I can still see office 365 groups
image

@AsishP
Copy link
Contributor

AsishP commented Jul 13, 2018

@harshdamaniahd , I suppose this is happening because Office 365 groups have email address and are considered users in the groups created. Might have to check how we can filter unified groups based on attribute. This might take some time.

@harshdamaniahd
Copy link
Author

@AsishP ok no issues.
I will wait.

@estruyf estruyf self-assigned this Sep 7, 2018
@estruyf estruyf added this to the 1.8.0 milestone Sep 7, 2018
estruyf added a commit that referenced this issue Sep 7, 2018
@estruyf
Copy link
Member

estruyf commented Sep 7, 2018

In version 1.8.0 you will be able to specify the PrincipleType which you want to retrieve: user, SharePoint group, security group, ... (multiple are possible).

Check the last line:

<PeoplePicker
            context={this.props.context}
            titleText="People Picker"
            personSelectionLimit={5}
            // groupName={"Team Site Owners"}
            showtooltip={true}
            isRequired={true}
            defaultSelectedUsers={["tenantUser@domain.onmicrosoft.com", "test@user.com"]}
            selectedItems={this._getPeoplePickerItems}
            principleTypes={[PrincipalType.User]} />

Feel free to test out the latest beta. More information about beta testing can be found here: https://sharepoint.github.io/sp-dev-fx-controls-react/beta/

@estruyf
Copy link
Member

estruyf commented Sep 12, 2018

Closing the issue as version 1.8.0 has just been released.

@estruyf estruyf closed this as completed Sep 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants