Microsoft Graph API邮件加密

时间:2018-10-28 10:00:19

标签: microsoft-graph outlook-restapi

我在Office 365中找不到与Microsoft Graph API邮件消息(https://developer.microsoft.com/en-us/graph/docs/api-reference/v1.0/resources/mail_api_overview)检索有关的信息。 如果邮件已加密,该怎么办,我仍然可以检索它吗?可以公开哪些元数据和数据?

1 个答案:

答案 0 :(得分:1)

  

如果邮件已加密,会发生什么情况,   我仍然可以找回它吗?什么是元数据和数据   暴露

是的,您仍然可以检索消息列表,但是不能通过Graph API获取实际的消息正文。邮件 Body / BodyPreview 将显示如下:

  

此消息受Microsoft信息保护保护。您   可以使用Microsoft Outlook(适用于iOS,Android,   Windows和Mac OS。在这里获取适用于您设备的Outlook:   http://aka.ms/protectedmessage。 Microsoft信息保护a

我的测试请求字符串:

https://graph.microsoft.com/v1.0/me/messages?$filter=startswith(subject,'Data Protected mail test')&top=1

响应数据(元数据供您参考):

{
    "@odata.context": "https://graph.microsoft.com/v1.0/$metadata#users('my user id')/messages",
    "@odata.nextLink": "https://graph.microsoft.com/v1.0/me/messages?$filter=startswith(subject%2c%27Data+Protected+mail+test%27)&top=1&$skip=1",
    "value": [
        {
            "@odata.etag": "W/\"CQAAABYAAADI9sWjzaI4R7XL22NiFR43AACWTT+Z\"",
            "id": "AAMkADQ5OWMzMGEwLTg4ZjktNDk1Ny05NzFmLWRh……bPeZSPaAAF6dOzdAAA=",
            "createdDateTime": "2016-11-03T05:23:25Z",
            "lastModifiedDateTime": "2018-09-04T11:19:40Z",
            "changeKey": "CQAAABYAAADI9sWjzaI4R7XL22NiFR43AACWTT+Z",
            "categories": [],
            "receivedDateTime": "2016-11-03T05:23:25Z",
            "sentDateTime": "2016-11-03T05:20:36Z",
            "hasAttachments": false,
            "internetMessageId": "<……@…….prod.outlook.com>",
            "subject": "Data Protected mail test ",
            "bodyPreview": "This message is protected with Microsoft Information Protection. You can open it using Microsoft Outlook, available for iOS, Android, Windows, and Mac OS. Get Outlook for your device here: http://aka.ms/protectedmessage. Microsoft Information Protection a",
            "importance": "normal",
            "parentFolderId": "……=",
            "conversationId": "……=",
            "isDeliveryReceiptRequested": null,
            "isReadReceiptRequested": false,
            "isRead": false,
            "isDraft": false,
            "webLink": "https://outlook.office365.com/owa/?ItemID= ……&exvsurl=1&viewmodel=ReadMessageItem",
            "inferenceClassification": "focused",
            "body": {
                "contentType": "text",
                "content": "This message is protected with Microsoft Information Protection. You can open it using Microsoft Outlook, available for iOS, Android, Windows, and Mac OS. Get Outlook for your device here: http://aka.ms/protectedmessage. Microsoft Information Protection allows you to ensure your emails can’t be copied or forwarded without your permission. Learn more at http://microsoft.com/rms."
            },
            "sender": {
                "emailAddress": {
                    "name": "Test admin",
                    "address": "testadmin@microsoft.com"
                }
            },
            "from": {
                "emailAddress": {
                    "name": "Test admin",
                    "address": "testadmin@onmicrosoft.com"
                }
            },
            "toRecipients": [
                {
                    "emailAddress": {
                    "name": "Test admin",
                    "address": "testadmin@onmicrosoft.com"
                } ,
                 "emailAddress": {
                    "name": "Test admin",
                    "address": "testadmin@onmicrosoft.com"
                }   
            ],
            "ccRecipients": [],
            "bccRecipients": [],
            "replyTo": [],
            "flag": {
                "flagStatus": "notFlagged"
            }
        }
    ]
}