Skip to content

Commit 7a3e66f

Browse files
authored
Merge pull request #1175 from RicoNL/peoplepicker-transitivemembers
people picker transitive members
2 parents 095285f + b8f090b commit 7a3e66f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/services/PeopleSearchService.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -223,9 +223,9 @@ export default class SPPeopleSearchService {
223223
searchBody.queryParams["SharePointGroupID"] = groupId;
224224
}
225225

226-
// Check if users need to be searched in a specific Office365 Group
226+
// Check if users need to be searched in a specific Microsoft 365 Group, Security Group (incl. nested groups) or Distribution List
227227
else if(groupId && typeof(groupId) === 'string') {
228-
const graphUserRequestUrl = `/groups/${groupId}/members?$count=true&$search="displayName:${query}" OR "mail:${query}"`;
228+
const graphUserRequestUrl = `/groups/${groupId}/transitiveMembers?$count=true&$search="displayName:${query}" OR "mail:${query}"`;
229229
const graphClient = await this.context.msGraphClientFactory.getClient();
230230
const graphUserResponse = await graphClient.api(graphUserRequestUrl).header('ConsistencyLevel', 'eventual').get();
231231

0 commit comments

Comments
 (0)