a minimal example of a notification service to receive notifications from Microsoft Graph subscriptions
in order to run the server, you have 2 choices:
- locally:
npm install
npm start
- docker:
docker-compose up
in order to do that, you need to subscribe the service to microsoft graph.
this can be done in one of 2 ways:
- use Microsoft Graph Exlporer
- perform a proper POST request to Microsoft Graph Subscription Endpoint.
you can use the following sample as your body:
{
"changeType": "created, updated, deleted",
"notificationUrl": "<your server's https url>",
"resource": "me/messages",
"expirationDateTime": "2019-08-03T18:23:45.9356913Z"
}
pay attention the notificationUrl
MUST be an https endpoint