Assistance Request: Implementing Microsoft Graph Email Change Notifications in Python

Jacob Rafal 0 Reputation points
2023-08-31T07:09:09.94+00:00

I am writing to seek your assistance with a particular issue I am facing while trying to implement Microsoft Graph email change notifications in Python.

 

Firstly, let me assure you that I have carefully reviewed the Microsoft Graph documentation and watched video tutorials related to this topic. While I have successfully used Microsoft Graph to perform GET requests for emails, I am encountering challenges when it comes to setting up change notifications using subscriptions.

 

All the necessary permissions have been granted, and I have verified that my credentials are correct. Despite this, I have encountered some difficulties while attempting to implement the subscription feature in Python.

 

I have tried to adapt the documentation and video tutorial examples to my Python environment, but I am encountering some errors that I'm unable to resolve on my own. To give you a better understanding, I have attached screenshots of my code implementations along with the error messages.

Implementation Code 1:

![A screenshot of a computer program

Description automatically generated](/api/attachments/63a7532b-56d1-4043-ab12-33e21e900ab4?platform=QnA)

 User's image

 

Implementation Code 2:User's image

Result:

Error creating subscription:

400 {"error":{"code":"InvalidRequest","message":"Subscription validation request failed. Notification endpoint must respond with 200 OK to validation request.","innerError":{"date":"2023-08-30T10:26:01","request-id":"eec3244b-8b21-47fe-a540-7de9d1feba8f","client-request-id":"eec3244b-8b21-47fe-a540-7de9d1feba8f"}}}

 User's image

 

My primary goal is to receive email change notifications in real-time as emails are received. This real-time functionality is critical for my project, which is why I am eager to implement subscriptions.

 

I genuinely appreciate any assistance or guidance you can provide in resolving the issues I am facing. If there are any specific code examples or approaches in Python that you could recommend, it would be immensely helpful.

 

Thank you for taking the time to consider my request, and I am looking forward to your valuable guidance.

Microsoft Security | Microsoft Graph
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Anonymous
    2023-08-31T15:06:57.7433333+00:00

    Hello Jacob Rafal,

    Thanks for reaching out. For any queries related to custom code or Graph SDK please post them on the respective Graph SDK forum as they are not supported in this forum.

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

    Thanks.

    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.