Jun 15 2022 10:58 PM - edited Jun 15 2022 11:03 PM
Hello, I'm writing a java project to create subscription to online meeting resources. I followed this instruction https://docs.microsoft.com/en-us/graph/webhooks?view=graph-rest-1.0
to construct a new subscription. This is my request:
POST https://graph.microsoft.com/beta/subscriptions
Content-Type: application/JSON
change Type": "created, updated"
"notificationUrl": "https://my.ngrok.url/notificationClient",
"resource": "/communications/onlineMeetings/{meetingID}",
"expirationDateTime": "2016-03-20T11:00:00.0000000Z",
"clientState": "SecretClientState"
And I created a project locally to receive the POST request as follow
@PostMapping(path = "/notificationClient")
public ResponseEntity<String> Notification(@PathParam ("validationToken") String opaqueTokenCreatedByMicrosoftGraph)
I should receive request from Microsoft Graph like this:
Content-Type: text/plain; charset=utf-8 POST https://{notificationUrl}?validationToken={opaqueTokenCreatedByMicrosoftGraph}
However, the validationToken I received is null. Is there anything wrong and how to create a subscription to online meeting resources?
Jun 15 2022 11:48 PM
@ChenguangHe - Could you please refer this sample?
Microsoft-Teams-Samples/samples/graph-change-notification at main · OfficeDev/Microsoft-Teams-Sample...
Jun 15 2022 11:59 PM
Jun 16 2022 12:55 AM - edited Jun 16 2022 12:56 AM
@ChenguangHe - There is no Java sample available for it. However, this thread discusses about similar issue. Please have a look at once which explains:
validationToken will only send to the webhook at the time of Subscription creation, after that Microsoft start sending the change notifications and there won't be any validationToken send with the change notification. This is done just to ensure that the Notification endpoint is valid/active.
Set up notifications for changes in resource data - Microsoft Graph | Microsoft Docs
Jun 16 2022 08:28 AM - edited Jun 20 2022 12:25 AM
Hi @Prasad_Das-MSFT, I used the given sample and still have some issues. When I create request of change notification, how can I get clientState, encryptionCertificate and encryptionCertificateId?
Jun 20 2022 07:00 AM
@ChenguangHe - Please refer this doc: changeNotification resource type - Microsoft Graph v1.0 | Microsoft Docs