我試圖找到通訊組列表的所有成員,因爲它是電子郵件地址。假設我有[email protected]
並想擴展其成員,只返回displayName
和userPrincipalName
,我可以這樣做嗎?
我使用Microsoft Graph Explorer,以我自己的身份登錄。在查詢框,我可以用$過濾得到group and members和$擴展 -
https://graph.microsoft.com/v1.0/groups/?$filter=mail+eq+'[email protected]'&$expand=members
但反應是巨大的,已經擴大了每個成員充分發揮其特性集。我只想包括displayName
和userPrincipalName
。我想也許能瘦下來與$select
響應 -
https://graph.microsoft.com/v1.0/groups/?$filter=mail+eq+'[email protected]'&$expand=members($select=displayName,userPrincipalName)
但這樣做會返回一個錯誤 -
{
"error": {
"code": "Request_BadRequest",
"message": "Term 'members($select=displayName,userPrincipalName)' is not valid in a $select or $expand expression.",
"innerError": {
"request-id": "02f3471c-9e93-4bcc-8b7f-dffd187cd33a",
"date": "2016-05-13T23:04:00"
}
}
}
這可能嗎?我在正確的軌道上嗎? select語句是錯誤的,因爲返回的輸出是一個數組?
你找到了解決方案嗎? – 2017-02-23 08:51:59