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] people-picker not able to search people within group-ids #3170

Open
tgaarde opened this issue May 3, 2024 · 1 comment
Open

[BUG] people-picker not able to search people within group-ids #3170

tgaarde opened this issue May 3, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@tgaarde
Copy link

tgaarde commented May 3, 2024

Describe the bug
When people picker is provided with group-ids, type is "person", user-type is "any",
i can not search users from thouse groups.

when a search is performed, the request is missing the query $count="true" and the header "ConsistencyLevel"="eventual".

To Reproduce
Steps to reproduce the behavior:

then search a user within thouse group ids, will result in a query like this:

  1. https://graph.microsoft.com/v1.0/groups/18c5e772-6757-4d50-883b-bb05fdec8d9d/transitiveMembers/microsoft.graph.user?$top=6&$filter=startswith(displayName,%27jonas%27)%20or%20startswith(givenName,%27jonas%27)%20or%20startswith(surname,%27jonas%27)%20or%20startswith(mail,%27jonas%27)%20or%20startswith(userPrincipalName,%27jonas%27)

  2. https://graph.microsoft.com/v1.0/groups/f9757e6d-92ba-4552-8fc7-5eec386a9a37/transitiveMembers/microsoft.graph.user?$top=6&$filter=startswith(displayName,%27jonas%27)%20or%20startswith(givenName,%27jonas%27)%20or%20startswith(surname,%27jonas%27)%20or%20startswith(mail,%27jonas%27)%20or%20startswith(userPrincipalName,%27jonas%27)

they return 400 with message: "The specified filter to the reference property query is currently not supported."

if i then edit the request, and put in my query $count="true" and the header "ConsistencyLevel"="eventual" and resend, i get the result i expect for the resended query.

Expected behavior
i expect to see users from the provided group ids, and when i search, i search users within the group ids.

Screenshots
Fine when i have no search:
image

Error when i search:
image
image

Environment:

  • OS: Windows
  • Browser: Edge
  • Framework: Blazor
  • Context: Graph toolkit as webcomponents in blazor
  • Version: 4.2.1
  • Provider: SimpleProvider
@tgaarde tgaarde added bug Something isn't working Needs: Triage 🔍 labels May 3, 2024
@gavinbarron
Copy link
Member

Thanks for reporting this issue in such a through manner @tgaarde, bug reports like this are gold.

The offending code segment is in the findGroupMembers function in graph.user.ts

Is this a fix that you'd be able to contribute back to MGT?

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

No branches or pull requests

2 participants