Which data is available for encrypted emails when querying Messages over MS Graph API?

andrea 1 Reputation point
2020-10-26T15:06:12.49+00:00

Hey people,

does anyone know which data is available when calling https://graph.microsoft.com/v1.0/me/messages and trying to read an encrypted email in an inbox?

Outlook can send encrypted emails and I am wondering what the API behaviour is when reading those emails over the API. I cannot find any documentation on this matter, only a SO question dated almost 2 years ago

Is the email's subject available?
The sender email address?
Send/Received time?
Email body, how does it look like?
Attachments?

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,716 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Shiva Keshav Varma 401 Reputation points
    2020-10-26T16:48:59.697+00:00

    This feature is not yet present in the MS Graph. There is already a feature request created for it and you can upvote this feature in the Microsoft Graph Feedback Forum here.

    By using the me/messages endpoint you will be seeing your all mails in your mailbox.

    Yes, you would see all the data like subject, to, from, body and many other properties. The output for the me/messages endpoint will be similar as below with your data.

    Request:

    GET https://graph.microsoft.com/v1.0/me/messages?$select=sender,subject  
    

    Response:

    {  
        "@odata.context": "https://graph.microsoft.com/v1.0/$metadata#users('bb8775a4-4d8c-42cf-a1d4-4d58c2bb668f')/messages(sender,subject)",  
        "@odata.nextLink": "https://graph.microsoft.com/v1.0/me/messages?$select=sender%2csubject&$skip=14",  
        "value": [  
            {  
                "@odata.etag": "W/\"CQAAABYAAADHcgC8Hl9tRZ/hc1wEUs1TAAAwR4Hg\"",  
                "id": "AAMkAGUAAAwTW09AAA=",  
                "subject": "You have late tasks!",  
                "sender": {  
                    "emailAddress": {  
                        "name": "Microsoft Planner",  
                        "address": "noreply@Planner.Office365.com"  
                    }  
                }  
            },  
            {  
                "@odata.etag": "W/\"CQAAABYAAADHcgC8Hl9tRZ/hc1wEUs1TAAAq4D1e\"",  
                "id": "AAMkAGUAAAq5QKlAAA=",  
                "subject": "You have late tasks!",  
                "sender": {  
                    "emailAddress": {  
                        "name": "Microsoft Planner",  
                        "address": "noreply@Planner.Office365.com"  
                    }  
                }  
            },  
            {  
                "@odata.etag": "W/\"CQAAABYAAADHcgC8Hl9tRZ/hc1wEUs1TAAAq4D0v\"",  
                "id": "AAMkAGUAAAq5QKkAAA=",  
                "subject": "Your Azure AD Identity Protection Weekly Digest",  
                "sender": {  
                    "emailAddress": {  
                        "name": "Microsoft Azure",  
                        "address": "azure-noreply@microsoft.com"  
                    }  
                }  
            },  
            {  
                "@odata.etag": "W/\"CQAAABYAAADHcgC8Hl9tRZ/hc1wEUs1TAAAq4DsN\"",  
                "id": "AAMkAGUAAAq5QKjAAA=",  
                "subject": "Use attached file",  
                "sender": {  
                    "emailAddress": {  
                        "name": "Megan Bowen",  
                        "address": "MeganB@contoso.OnMicrosoft.com"  
                    }  
                }  
            },  
            {  
                "@odata.type": "#microsoft.graph.eventMessage",  
                "@odata.etag": "W/\"CwAAABYAAADHcgC8Hl9tRZ/hc1wEUs1TAAAq4Dfa\"",  
                "id": "AAMkAGUAAAq5T8tAAA=",  
                "subject": "Review strategy for Q3",  
                "sender": {  
                    "emailAddress": {  
                        "name": "Megan Bowen",  
                        "address": "MeganB@contoso.OnMicrosoft.com"  
                    }  
                }  
            }  
        ]  
    }  
    

    You can try these calls in POSTMAN or Graph Explorer. Please go through this document for more details.

    (If the reply was helpful please don't forget to upvote or accept as answer, thank you)