Forum Discussion
ivtree
Jan 04, 2024Copper Contributor
Sharepoint webhooks notification
Below is my Payload to subscribe for the notification
callback_url = "https://8933-2401-4900-62f3-ba61-d8d5-dc01-e7da-15a3.ngrok-free.app/api/webhook-subscription" # Update with your ngrok or server URL
payload = {
"changeType": "updated",
"notificationUrl": callback_url,
"resource": f"/drives/{drive_id}/root",
"expirationDateTime" : "2025-01-01T11:00:00.0000000Z",
"clientState" : "secretClientState",
}
where I am getting a subscription notification JSON data like below
response i have got from microsoft:
{'value': [{'subscriptionId': '45e04795-4682-48c0-802f-e1d1ff16894e', 'clientState': 'secretClientState', 'resource': '/drives/b!0YwZe3606kCadZWpmYWNVyVIiFxJQaZNkhf0tfxOCaLXmQ-TqFv-TLi_dRCj60mt/root', 'tenantId': 'dcba7061-faa5-4e07-85a4-a3f1dba56d9e', 'resourceData': {'@odata.type': '#Microsoft.Graph.DriveItem'}, 'subscriptionExpirationDateTime': '2024-01-01T11:00:00+00:00', 'changeType': 'updated'}]}
Here my question is I am not getting the details about which file got updated or changed when receiving notifications from a Microsoft Graph subscription.
where I am getting a subscription notification JSON data like below
response i have got from microsoft:
{'value': [{'subscriptionId': '45e04795-4682-48c0-802f-e1d1ff16894e', 'clientState': 'secretClientState', 'resource': '/drives/b!0YwZe3606kCadZWpmYWNVyVIiFxJQaZNkhf0tfxOCaLXmQ-TqFv-TLi_dRCj60mt/root', 'tenantId': 'dcba7061-faa5-4e07-85a4-a3f1dba56d9e', 'resourceData': {'@odata.type': '#Microsoft.Graph.DriveItem'}, 'subscriptionExpirationDateTime': '2024-01-01T11:00:00+00:00', 'changeType': 'updated'}]}
Here my question is I am not getting the details about which file got updated or changed when receiving notifications from a Microsoft Graph subscription.
No RepliesBe the first to reply