如果我有一個ID爲「[email protected]」的Office 365組/微軟團隊,並且我想使用其中一個測試API(如this)查詢它,我需要查詢一個URL,例如https://graph.microsoft.com/beta/groups/{id}/threads
。不過,我堅持編碼團隊名稱。 https://graph.microsoft.com/beta/groups/[email protected]/threads
,https://graph.microsoft.com/beta/groups/[email protected]%2Eonmicrosoft%2E/threads
和https://graph.microsoft.com/beta/groups/[email protected]/threads
,https://graph.microsoft.com/beta/groups/"[email protected]"/threads,
和https://graph.microsoft.com/beta/groups/"[email protected]"/threads
所有返回以下錯誤如何編碼Microsoft組和團隊名稱的名稱,以將它們包含在API調用URL中?
"error": {
"code": "Request_BadRequest",
"message": "Invalid object identifier 'whatever_I_entered'."
這會產生相同的錯誤。 – stackquestions23
您可以運行請求來檢索可用組的列表嗎? [List Groups](https://developer.microsoft.com/en-us/graph/docs/api-reference/v1.0/api/group_list)。你在列表中看到請求的組ID嗎?順便說一下,你需要使用** ID **! –
謝謝,就是這樣!在Office365管理面板中,名稱@電子郵件格式標記爲組ID,但您鏈接到的列表組API會返回正確的值。 – stackquestions23