Microsoft-graph-docs: created changeType is not working in subscriptions

Created on 12 Jun 2019  Â·  11Comments  Â·  Source: microsoftgraph/microsoft-graph-docs

I want to create the subscription that notifies when users are created.
So I created the subscription as described in this document, but an error occurred.

request

POST https://graph.microsoft.com/beta/subscriptions

{
  "changeType": "created",
  "notificationUrl": "xxxx",
  "resource": "users",
  "expirationDateTime": "2019-06-13T09:09:11.253Z",
  "clientState": "xxx"
}

response

{
    "error": {
        "code": "InvalidRequest",
        "message": "Invalid 'changeType' attribute: 'created'.",
        "innerError": {
            "request-id": "xxx",
            "date": "2019-06-12T10:22:44"
        }
    }
}

Document Details

⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

webhooks

All 11 comments

Hi All,
I'm also having Issue on the creation of Event Subscrition same with @selmertsx

request:
POST https://graph.microsoft.com/v1.0/subscriptions

{
"changeType": "created,updated",
"notificationUrl": "xxxx",
"resource": "users/{xxxxxxxxx}/calendar/events",
"expirationDateTime": "2019-06-13T10:13:23.206Z",
"clientState": "xxx"
}
response:
{
"error": {
"code": "InvalidRequest",
"message": "Subscription validation request failed. Must respond with 200 OK to this request.",
"innerError": {
"request-id": "xxx",
"date": "2019-06-13T09:58:44"
}
}
}

please let us know if there are existing errors on Subscription creation. I tried mail subscription same error

Hi @mjmamaril

It seems that your notification endpoint validation was failed.
Please see following docs.

https://docs.microsoft.com/en-us/graph/webhooks#notification-endpoint-validation

User and Group notifications now support updated and deleted only.

see subscription resource type - Microsoft Graph v1.0 | Microsoft Docs

| Property | Type | Description |
|:---------|:-----|:------------|
| changeType | string | Required. Indicates the type of change in the subscribed resource that will raise a notification. The supported values are: created, updated, deleted. Multiple values can be combined using a comma-separated list.

Note: Drive root item notifications support only the updated changeType. User and group notifications support updated and deleted changeType.|

Anyway it is useful for developers to support user "created" changeType.

@piotrci What do you think about it?

A few days ago, Microsoft support engineer taught me that "updated" changeType can detect when new users are created. I can create the subscription that notifies when users are created. So I close this issue.

thank you so much @watahani.

@selmertsx I tried creating a new user, with subscription on change type updated. Notification was not received, unless I updated the user.

@selmertsx I have the same issue as @parvezaliv-arch

@selmertsx Can you please provide more details how this was achieved? - _Microsoft support engineer taught me that "updated" changeType can detect when new users are created. I can create the subscription that notifies when users are created. So I close this issue_

@selmertsx Could you please help us that how to make it work "updated" changeType can detect when new users are created. We have tried "updated" changeType but its not dedected when we create a new user.

Hi All, I have too faced the same issue while looking for the solution I came across this link https://docs.microsoft.com/en-us/graph/known-issues#change-notifications it says, changeType set to updated will receive notifications on the creation of a new user. It worked for me, let me know if it helps. It worked for me.

Hi @rishihashbinary , You are correct. changeType set to updated will receive notifications on the creation of a new user. Its workiing. Thanks for the confirmation.

For detecting new users, setting changeType to 'updated' works for me too. Thanks!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

climam picture climam  Â·  4Comments

abhatt29 picture abhatt29  Â·  4Comments

gi-joe-moto picture gi-joe-moto  Â·  3Comments

GregSpyra picture GregSpyra  Â·  4Comments

nilleb picture nilleb  Â·  4Comments