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

Contains filter on Microsoft Graph query not working

我正在尝试在 /users 查询中使用 contains 过滤器,例如: https://graph.microsoft.com/v1.0/users?$filter=contains(displayName, 'Garth')

但是,这会导致 BadRequest 响应说 "An unknown function with name 'contains' was found. This may also be a key lookup on a navigation property, which is not allowed."

根据 OData 4.0 规范,contains 过滤器应该可用。有没有办法在用户列表中使用包含过滤器?

用户无法使用contains功能。 startsWith 可用。
例如https://graph.microsoft.com/v1.0/users?$filter=startswith(displayName,'Garth').

此外,您可以尝试人员 API(这仅适用于 /beta)。这支持 $search 并将进行模糊和语音匹配。 https://graph.microsoft.com/beta/me/people?$search=加思