Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Receiving "Invalid 'changeType'" when subscribing to user created event

I am trying to create a Webhook (aka Subscription) for users who are created, updated, or deleted in Office 365.

With the "changeType": "updated" it works fine but with "changeType": "created" it returns an error:

This is the request:

{
    "changeType": "created,updated,deleted",
    "notificationUrl": "https://ourLink",
    "resource": "users",
    "expirationDateTime": "2017-12-16T14:49:57Z",
    "clientState": "pe1g9gqiVsE6KnHTUuK9Tts3o660KOAw9YnavVfKhr22I7FlqC0tfMhpayxrqFP4orFPOjK0rppYtDicvxZosbvOEEgfy3YYoM3FGDwLQiW4MAdSCTdQkffuChjmB"
}

Error:

{
    "header": 400,
    "body": {
        "error": {
            "code": "InvalidRequest",
            "message": "Invalid 'changeType' attribute: 'created'.",
            "innerError": {
                "request-id": "74454900-d3df-4962-b58e-cfd7ec7454bc",
                "date": "2017-12-13T16:49:59"
            }
        }
    }
}

Creating a subscription to a user resource is only available in the Beta API but according to the documentation, it should work.

like image 653
D. Pinheiro Avatar asked Nov 28 '25 11:11

D. Pinheiro


1 Answers

Based on the error message and that the User Webhook sample application only handles updated and deleted, this should be the expected behavior.

I'm also unable to find where in the documentation it states that a user resource accepts subscriptions for created. If you could provide a link I will make sure the documentation gets updated.

like image 77
Marc LaFleur Avatar answered Nov 30 '25 06:11

Marc LaFleur



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!