我想搜索图形API用户的名字不以某个值开头的每个人
我试过
DateValue(dateVar)
但是我得到了
无效的过滤条款
有没有办法实现这个目标?
我实际上需要在C#中执行此操作,我遇到同样的问题 - 我想知道是否有使用SDK指定https://graph.microsoft.com/v1.0/users?$filter="NOT startswith(displayName,'J')"
https://graph.microsoft.com/v1.0/users?$filter=not(startswith(displayName,'J'))
的方法?
NOT STARTSWITH
答案 0 :(得分:1)
我担心users
(或任何其他Azure AD资源)不支持此类过滤器。来自documentation:
Azure AD资源不支持以下
$filter
运算符:ne
,gt
,ge
,lt
,le
和not
。
答案 1 :(得分:1)
它不是用户,但我设法通过 not startsWith
获取数据,如下所示:
client.DeviceManagement.ManagedDevices.Request().Filter("not startsWith(operatingSystem, 'Windows')").GetAsync()