有没有一种方法可以在 Microsoft Graph 中使用 $filter 来按包含指定字符串的显示名称过滤组织中的 return 用户?
Is there a way to use $filter in Microsoft Graph to return users in the organization filter by display name that CONTAINS a specified string?
我检查了以下文档,没有成功:
https://graph.microsoft.io/en-us/docs/overview/query_parameters#filter
上面的文档还提到:
"These parameters are compatible with the OData V4 query language."
查看OData V4查询语言,我也没有发现:
我也查过这个:
我需要这样的东西:
考虑到一个用户及其 displayName 等于 "Pedro",我需要找到一种方法来使用 $filter(或 Microsoft Graph 中的任何其他可能性)来 return 它作为响应的一部分如果我写 "edr" 或任何其他子字符串。 startswith 和 endswith 不符合我的需要。
不幸的是,Microsoft Graph 中目录资源的过滤通常非常有限。包含查询(substrings/full-text 搜索或 $search)不可用于目录资源 - 唯一可能的是完全匹配或 startswith 过滤器。请在 User Voice 上提交 search/contains 功能请求 - https://officespdev.uservoice.com/。
最好能更好地了解您的场景,了解为什么 startswith 过滤器对您不起作用。
希望对您有所帮助,
我检查了以下文档,没有成功:
https://graph.microsoft.io/en-us/docs/overview/query_parameters#filter
上面的文档还提到:
"These parameters are compatible with the OData V4 query language."
查看OData V4查询语言,我也没有发现:
我也查过这个:
我需要这样的东西:
考虑到一个用户及其 displayName 等于 "Pedro",我需要找到一种方法来使用 $filter(或 Microsoft Graph 中的任何其他可能性)来 return 它作为响应的一部分如果我写 "edr" 或任何其他子字符串。 startswith 和 endswith 不符合我的需要。
不幸的是,Microsoft Graph 中目录资源的过滤通常非常有限。包含查询(substrings/full-text 搜索或 $search)不可用于目录资源 - 唯一可能的是完全匹配或 startswith 过滤器。请在 User Voice 上提交 search/contains 功能请求 - https://officespdev.uservoice.com/。
最好能更好地了解您的场景,了解为什么 startswith 过滤器对您不起作用。
希望对您有所帮助,