Share via

If i delete the email after restore the email inbox then microsoft graph api send a new created notification on end point

Brijesh Kannaujiya 0 Reputation points
2023-12-27T09:50:01.2166667+00:00

see the image If i delete the email after restore the email in box then microsoft graph api send a new created notification on end point

url : https://graph.microsoft.com/v1.0/subscriptions

{
    "changeType": "created",
    "notificationUrl": "https://8f3e-49-249-44-34.ngrok-free.app/pp/",
    "resource": "/me/messages",
    "expirationDateTime": "2023-12-31T23:23:45.9356913Z",
    "clientState": "7YT8Q~JU.bB1SkGw5bQmGEQPS06pCDTPBb3M1a5~",
    "latestSupportedTlsVersion": "v1_2",
    "includeResourceData" : true
}

if i delete the email after restore the email in inbox then microsoft is send new notification on endpoint

Screenshot 2023-12-27 151504

Screenshot 2023-12-27 151521

Microsoft Security | Microsoft Graph
Microsoft Security | Microsoft Entra | Other
0 comments No comments

1 answer

Sort by: Most helpful
  1. Md Asif Muztaba 340 Reputation points Microsoft External Staff
    2023-12-30T02:28:34.59+00:00

    Yes, the Microsoft Graph API sends a new “created” notification to the endpoint when an email is restored after deletion. This is because the Microsoft Graph API treats the restoration of a deleted email as a new creation event.

    The changeType field in the subscription JSON you provided is set to “created”, which means the API will send notifications when new messages are created. When an email is restored, it’s considered as a new message, hence the “created” notification.

    Please note that this behavior is by design and is a known issue when you use the change notification of the user calendar event (/users/{id}/events). Subscriptions to changes for user with changeType set to updated will also receive notifications of changeType: updated on user creation and user soft deletion.

    I hope this clarifies your question. Let me know if you have any other questions!

    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.