2017-09-14 54 views
1

我正在嘗試按照Microsoft Graph API中的屬性篩選用戶。基本上試圖獲得已分配給定jobTitle的用戶列表。在MSGraph中篩選用戶

例如,https://graph.microsoft.com/v1.0/users?$filter=jobtitle eq 'ACCOUNT EXECUTIVE'返回用戶列表。

我的要求是查詢沒有JobTitle的用戶。

試過https://graph.microsoft.com/v1.0/users?$filter=jobtitle ne null,並得到以下消息。

{ 
    "error": { 
     "code": "Request_UnsupportedQuery", 
     "message": "Unsupported property filter clause operator 'NotEqualsMatch'.", 
     "innerError": { 
      "request-id": "c9b290bf-2902-4b79-b35b-0f5d251ad80b", 
      "date": "2017-09-14T11:18:52" 
     } 
    } 
} 

回答

1

根據這個混帳問題,我不認爲它支持:https://github.com/microsoftgraph/microsoft-graph-docs/issues/239(它最終只是圍繞着發現房間)

有沒有辦法來過濾用戶收集與姓實體等於空或空字符串。過濾器的值必須介於1到64個字符之間,如下所示:https://msdn.microsoft.com/en-us/Library/Azure/Ad/Graph/api/entity-and-complex-type-reference#userentity - marych 2016年4月26日

缺少空過濾是由於用戶編入索引的方式。我們無法有效檢索未設置索引屬性的用戶。沒有計劃改變這一點。 - marych 2016年5月13日