Having problems with Graph Api notification subscriptions.

Sid Nandy 1 Reputation point
2021-06-20T14:15:28.96+00:00

Hello Team,
I work in LEGO Denmark as a Senior Cloud Engineer. I am working on a proof of concept to get change notifications from MS Graph api.

Use Case: Our Azure Ad group belongs to the business users and whenever they add members to the group we need to add them to our application users.

POC: I have a VS Studio subscription sid@sidlego.onmicrosoft.com which I am using before I implement services in LEGO subscriptions. I am sending a subscription request:
{
"changeType": "updated,deleted",
"notificationUrl": "webhook_url",
"resource": "/groups/b94dc0d9-5b8b-413a-8849-a4aee0f627fc/members",
"expirationDateTime": "2021-06-23T05:27:27.9069688-07:00",
"clientState": "guid"
}

and

{
"changeType": "updated,deleted",
"notificationUrl": "webhook_url",
"resource": "/groups/b94dc0d9-5b8b-413a-8849-a4aee0f627fc",
"expirationDateTime": "2021-06-23T05:27:27.9069688-07:00",
"clientState": "guid"
}

In both the cases when members are added to the group I get notification

{"ChangeType":1,"ClientState":"9b1383ce-7976-4cb9-9f4c-fd55c0cab70d","EncryptedContent":null,"Id":null,
"LifecycleEvent":null,"Resource":"Groups/b94dc0d9-5b8b-413a-8849-a4aee0f627fc","ResourceData":{"AdditionalData":
null,"ODataType":"microsoft.graph.resourceData"},"SubscriptionExpirationDateTime":"2021-06-23T05:27:27.9069688-0
7:00","SubscriptionId":"32629bde-7bd6-4d85-ac89-73e87d041294","TenantId":"47edd223-6a96-4db7-988d-bc35df20370c",
"AdditionalData":null,"ODataType":"microsoft.graph.changeNotification"}

and

{"ChangeType":1,"ClientState":"8a03f94d-4017-411a-b81f-b6a94255ffdf","EncryptedContent":null,"Id":null,
"LifecycleEvent":null,"Resource":"Groups/b94dc0d9-5b8b-413a-8849-a4aee0f627fc","ResourceData":{"AdditionalData":
null,"ODataType":"microsoft.graph.resourceData"},"SubscriptionExpirationDateTime":"2021-06-23T05:20:26.4241532-0
7:00","SubscriptionId":"4af2fa52-5ad0-4e73-859e-0a4c2b46e194","TenantId":"47edd223-6a96-4db7-988d-bc35df20370c",
"AdditionalData":null,"ODataType":"microsoft.graph.changeNotification"}

I know that groups doesn't support resource data but the documentation says it will send enough data to do a get resource call with the notification.
In the above case there is no difference between the replies and it does not contain the user id?
Please help me with the issue, we need to solve this use case asap. Thanks!

Best,
Siddhartha

Not Monitored
Not Monitored
Tag not monitored by Microsoft.
35,887 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Diana Wanjuhi 1,376 Reputation points
    2021-07-07T10:46:10.32+00:00

    Hello @Sid Nandy thank you for reaching out. Currently, resource data is not included in change notifications for groups as noted. Would you consider filing a feature request on the Microsoft365 Developer Platform so that this can be looked into?

    Let me know if this helps and if you have other questions,

    Diana.

    0 comments No comments