问题描述
我试图在/users查询中使用 contains 过滤器,例如: https://graph.microsoft.com/v1.0/users ?$ filter = contains(displayName,'Garth')
但是,这会导致 BadRequest 响应说:找到了一个名称为'contains'的未知函数.这也可能是对导航属性的关键查找,这是不允许的."
根据OData 4.0规范,包含过滤器应该可用.有没有办法在用户列表上使用包含过滤器?
contains
函数不适用于用户.但是startsWith
可用.
例如 https://graph.microsoft.com/v1.0/users?$filter=startswith(displayName,'Garth')
.. >
I'm trying to user the contains filter on a /users query, like this for example:https://graph.microsoft.com/v1.0/users?$filter=contains(displayName, 'Garth')
However, this results in a BadRequest response saying "An unknown function with name 'contains' was found. This may also be a key lookup on a navigation property, which is not allowed."
According to the OData 4.0 specs, the contains filter should be available though. Is there a way to use a contains filter on a list of users?
The contains
function is not available for users. startsWith
is available though.
e.g. https://graph.microsoft.com/v1.0/users?$filter=startswith(displayName,'Garth')
.
这篇关于包含Microsoft Graph查询上的过滤器不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!