Comments (8)
I reached out to the Graph Team. $search
on anything other than mail or displayName would fallback to a startsWith
$filter
request. When testing out $filter
directly I get an error message from Graph (although the API documentation states that it is supported), which might explain why $search
also isn't returning data.
I'll keep you informed!
from spfx-msgraph-peoplesearch.
from spfx-msgraph-peoplesearch.
So, this took a while but I come with information 😀.
My tests with $filter
were failing because I didn't use the correct magic header parameter (Consistencylevel: eventual) and forgot the $count=true
. It also seems that you need to encode the + character in a phone number to %2B
, otherwise $filter
does not return the expected results.
All of that applies to $search
as well BUT it currently only works on the /beta
endpoint of Graph, and the team is looking into it 😀.
Hope that gives you an insight into some potential causes of the malfunction you are experiencing.
from spfx-msgraph-peoplesearch.
from spfx-msgraph-peoplesearch.
They investigated this further, and all of this is due to an old Graph encoding bug that only manifested with $search
. This is fixed in /beta
but because there are already production apps that implement the workaround, they can't easily push the fix the v1.0
.
To make $search
work with the +-sign, you need to do double encoding 🤦♂️. Encode the + to %2B
and then encode the %
to %25
, resulting in %252B
. Example:
$search="mobilePhone:%252B1 860
Up to you to see how you want to take this knowledge into your customizations, but this is what the PG has told me and I have validated to be correct 😀
from spfx-msgraph-peoplesearch.
from spfx-msgraph-peoplesearch.
Yes, it'll still be startsWith and I am not sure if there is a change on the horizon soon. Sorry!
Can this issue be closed?
from spfx-msgraph-peoplesearch.
from spfx-msgraph-peoplesearch.
Related Issues (20)
- Interactive authorization request required HOT 4
- Not Working in Team HOT 6
- Problem with VIVA in Teams Desktop App HOT 8
- Problem using SharePoint Mobile App on Android and IOS HOT 2
- People Search default value HOT 2
- WebPart Settings: not visible after adding to page with pnp-modern-search webpart HOT 2
- People Search Results: Adaptive Cards not hoverable/clickable anymore HOT 3
- Token request previously failed HOT 2
- exclude inactive users HOT 2
- Search and view contacts: No action available to view more details about a person HOT 1
- WebPart not showing up after install HOT 1
- List view HOT 1
- Guests - Insufficient privileges HOT 2
- Card does not load correctly if selected person is guest HOT 3
- Search functions HOT 3
- User Card Display: Delay between User Profile Update and Populate to User Card HOT 1
- Dynamic results filtering like in PnP Search? HOT 3
- Being redirected to the SPFx redirect page: SPFx Single Sign On Redirect HOT 5
- Unable to display business phone HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from spfx-msgraph-peoplesearch.