
Announcements
I am trying to create a dropdown list with names of colleagues that work in a certain city (hardcoded).
So basically filtering all O365-records by city "Target City" and list their DisplayNames in a combobox or dropdown.
I have been using Microsoft365Users.SearchUserV2
I have no issue getting all me personal city information. Also searching for the city returns records but not with the Target City as city but in DisplayName or Name column.
I read that want to do is not possible as SearchUserV2 does not search in the city field.
Is that still the case? If so, any idea for a workaround?
Thanks a lot
Hi @Florida712
You are correct, the possible options for searching are user principal name and ID
If you could find a way to return all users, you could use a filter() to return only those in the correct city.
Let me have a play around in my environment and see what I can work out for you