Skip to content

Commit

Permalink
fix(people picker): fixes pnp#1292 where people picker returns no res…
Browse files Browse the repository at this point in the history
…ults.
  • Loading branch information
c-eiser13 committed Sep 7, 2022
1 parent a4c403e commit 6854f6e
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/services/PeopleSearchService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,18 +119,17 @@ export default class SPPeopleSearchService {
PrincipalSource: 15,
PrincipalType: this.getSumOfPrincipalTypes(principalTypes),
QueryString: query,
SharePointGroupID: null
}
};

// Search on the local site when "0"
if (siteUrl) {
searchBody.queryParams.SharePointGroupID = 0;
searchBody.queryParams["SharePointGroupID"] = 0;
}

// Check if users need to be searched in a specific SharePoint Group
if (groupId && typeof (groupId) === 'number') {
searchBody.queryParams.SharePointGroupID = groupId;
searchBody.queryParams["SharePointGroupID"] = groupId;
}

// Check if users need to be searched in a specific Microsoft 365 Group, Security Group (incl. nested groups) or Distribution List
Expand Down

0 comments on commit 6854f6e

Please sign in to comment.