Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/loops/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Microsoft graph api 图形浏览器错误无效格式_Microsoft Graph Api - Fatal编程技术网

Microsoft graph api 图形浏览器错误无效格式

Microsoft graph api 图形浏览器错误无效格式,microsoft-graph-api,Microsoft Graph Api,我正在使用 https://developer.microsoft.com/graph/graph-explorer/ 测试一些东西。当我使用 https://graph.microsoft.com/v1.0/me/mailFolders https://graph.microsoft.com/v1.0/me/mailFolders/Inbox/messages 我得到了我所期望的,收件箱中的文件夹和邮件列表。当把我改到我的电子邮件地址时,我会得到同样的信息。现在,当我尝试使用另一个邮箱时,

我正在使用

https://developer.microsoft.com/graph/graph-explorer/
测试一些东西。当我使用

https://graph.microsoft.com/v1.0/me/mailFolders
https://graph.microsoft.com/v1.0/me/mailFolders/Inbox/messages
我得到了我所期望的,收件箱中的文件夹和邮件列表。当把我改到我的电子邮件地址时,我会得到同样的信息。现在,当我尝试使用另一个邮箱时,我可以访问并尝试在“有趣的邮件”中获取邮件,我得到的错误是无效的。我认为问题在于路径中的空间

https://graph.microsoft.com/v1.0/users/otheremail@company.com/mailFolders/Interesting Messages/messages
{
"error": {
    "code": "ErrorInvalidIdMalformed",
    "message": "Id is malformed.",
    "innerError": {
        "request-id": "f47d4c3b-5681-4b83-b8f4-c2b9be591ff6",
        "date": "2019-02-07T22:39:31"
    }
}
我尝试使用%20而不是空格,但仍然出现错误。有没有办法在URL中使用空格,或者我需要重命名邮箱

蒂亚,
Joe

根据获取消息的文档

您必须使用邮件文件夹的{id}。这就是为什么你会得到“ErrorInvalidAlformed”,因为它需要一个id

你可以打电话来

GET /users/{id | userPrincipalName}/mailFolders

哇!如果不是收件箱、杂波或预定义邮箱之一,则为120个字符的字符串。谢谢你,杰里米,这很有效,但是很痛苦。
GET /users/{id | userPrincipalName}/mailFolders