I get the following error when trying to set up a rich notification subscription for events and messages
statusCode: 500,
code: 'ExtensionError',
requestId: 'fc9e0ae6-eae4-45d2-9599-1dc867030486',
date: 2023-11-27T12:45:48.000Z,
body: '{"code":"ExtensionError","message":"Operation: Create; Exception: [Status Code: InternalServerError; Reason: The operation failed with an unexpected error: 1.]","innerError":{"date":"2023-11-27T12:45:48","request-id":"fc9e0ae6-eae4-45d2-9599-1dc867030486","client-request-id":"b0edad5f-7c73-11ed-4ae8-8e80630b8f80"}}',
headers: HeadersList {
[Symbol(headers map)]: Map(10) {
'cache-control' => [Object],
'transfer-encoding' => [Object],
'content-type' => [Object],
'content-encoding' => [Object],
'vary' => [Object],
'strict-transport-security' => [Object],
'request-id' => [Object],
'client-request-id' => [Object],
'x-ms-ags-diagnostic' => [Object],
'date' => [Object]
},
[Symbol(headers map sorted)]: null
}
This occurs both through postman and using the @microsoft/microsoft-graph-client in node
I can successfully access the same resources and can also sucessfully create a non rich notification on the same user for the same resources so I dont think it is a permissions issue.
so this payload creates the error
const payload = {
changeType: 'created,updated,deleted', // triggers in lifecycle notification
notificationUrl: process.env.MS_WH_NOTIFICATION_URL,
lifecycleNotificationUrl: process.env.MS_WH_LIFECYCLE_NOTIFICATION_URL,
includeResourceData: true,
encryptionCertificate: certificate,
encryptionCertificateId: secretName,
resource: '/users/'+ subscription.oid +'/events?$select=id',
expirationDateTime: new Date(Date.now() + 20000),
clientState: subscription.oid,
}
whereas this payload works
const payload = {
changeType: 'created,updated,deleted', // triggers in lifecycle notification
notificationUrl: process.env.MS_WH_NOTIFICATION_URL,
lifecycleNotificationUrl: process.env.MS_WH_LIFECYCLE_NOTIFICATION_URL,
resource: '/users/'+ subscription.oid +'/events?$select=id',
resource: '/users/'+ subscription.oid +'/events',
expirationDateTime: new Date(Date.now() + 20000),
clientState: subscription.oid,
}
in both scenarios i get and return the validation requests to the endpoint and return a 200
I have also checked that my certificate is base64 encoded correctly.
I am connecting to the v1 version of graph but get the same result using beta so not sure what else to try as the error message doesn't help at all. This is a real blocker so would really appreciate any help.
Thanks