0
votes

I couldnt find information related to Microsoft Graph API Mail messages (https://developer.microsoft.com/en-us/graph/docs/api-reference/v1.0/resources/mail_api_overview) retrieval of encrypted mail messages in office 365. What happens if mail has been encrypted, will I still be able to retrieve it? what metadata and data can be exposed?

1

1 Answers

2
votes

What happens if mail has been encrypted, will I still be able to retrieve it? what metadata and data can be exposed

Yes, you still can retrieve the message list, but you cannot get the actual message body by Graph API. Mail Body/BodyPreview will show as below:

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

My test request string:

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

Response data(metadata for your reference):

{
    "@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"
            }
        }
    ]
}