有没有办法在 Microsoft Graph 中使用 $filter 通过包含指定字符串的显示名称返回组织过滤器中的用户? [英] 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?

查看:41
本文介绍了有没有办法在 Microsoft Graph 中使用 $filter 通过包含指定字符串的显示名称返回组织过滤器中的用户?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我检查了以下文档,未成功:

I have checked the following documentation, unsuccessfully:

https://graph.microsoft.io/en-us/docs/overview/query_parameters#filter

上面的文档还提到:

这些参数与 OData V4 查询语言兼容."

"These parameters are compatible with the OData V4 query language."

检查 OData V4 查询语言,我也没有发现任何东西:

Checking OData V4 query language, I have not found anything either:

http://docs.oasis-open.org/odata/odata/v4.0/errata03/os/complete/part2-url-conventions/odata-v4.0-errata03-os-part2-url-conventions-complete.html#_Toc453752356

我也检查了这个:

包含对 Microsoft Graph 查询不起作用的过滤器

我需要这样的东西:

考虑到用户及其 displayName 等于Pedro",我需要找到一种方法来使用 $filter(或 Microsoft Graph 中的任何其他可能性)将其作为响应的一部分返回,如果我写edr"或任何其他子串.开始和结束不符合我的需要.

Considering an user and its displayName equals to "Pedro", I need to find a way to use $filter (or any other possibility within Microsoft Graph) to return it as part of the response it if I write "edr" or any other substring. startswith and endswith do not fits in my needs.

推荐答案

不幸的是,Microsoft Graph 中对目录资源的过滤通常非常有限.包含查询(子字符串/全文搜索或 $search)不可用于目录资源 - 唯一可能的是完全匹配或开始过滤器.请在用户语音上提交搜索/包含功能的请求 - https://officespdev.uservoice.com/.

Unfortunately the filtering is generally pretty limited in Microsoft Graph for directory resources. Contains queries (substrings/full-text searches, or $search) are not available for directory resources - the only thing possible is a full match or startswith filter. Please file a request for search/contains capability on User Voice - https://officespdev.uservoice.com/.

最好能更好地了解您的场景,了解为什么开始过滤器对您不起作用.

It would be great to understand your scenario a little better to know why startswith filter doesn't work for you.

希望这会有所帮助,

这篇关于有没有办法在 Microsoft Graph 中使用 $filter 通过包含指定字符串的显示名称返回组织过滤器中的用户?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆