1

How can I get all of the users in my tenant? I get just the users in a group.

This is my code:

private _getPeoplePickerItems(items: any[]) {
    console.log('Items:', items);

  }

public render(): React.ReactElement<IHelloWorldProps> {
    return (
  <PeoplePicker
                context={this.props.context}
                titleText="People Picker"
                personSelectionLimit={1}

                showtooltip={true}
                isRequired={false}
                disabled={false}
                selectedItems={this._getPeoplePickerItems}
                showHiddenInUI={false}
                principleTypes={[PrincipalType.User]}
                defaultSelectedUsers={[this.props.mailProp]} />
);

Thanks for your help.

0

If you want to fetch all the users then you can leave the "GroupName" attribute in the control blank.

https://sharepoint.github.io/sp-dev-fx-controls-react/controls/PeoplePicker/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.