191180rk
191180rk

Reputation: 905

AAD Change Notifications - Delta query to track recent changes using "$deltaToken=latest"

I have created brand new AAD Group, added a couple of users to it, and removed users from it. I then tried the below request and it's returning a deltalink as expected:

https://graph.microsoft.com/beta/groups/delta/?$filter= id eq '900faee0-0115-44a9-876w-cd1644472792'&$deltaToken=latest

When trying to call the deltaLink I received using the above request, I'm getting an empty response without the expected members@delta showing recently added or deleted Users.

Note: I didn't try the delta function on the desired resource as I'm not interested in retrieving the full state of the resource but trying above $deltaToken=latest request as very first delta change query.

Upvotes: 1

Views: 1086

Answers (1)

Marc LaFleur
Marc LaFleur

Reputation: 33094

The reason you're not seeing membership changes is that you haven't expanded members in your query. Your current question will only return changes to the Group itself, not related entities.

To retrieve a delta for the Group & Members your query should be:

/v1.0/groups/delta/?$expand=members&$filter= id eq '900faee0-0115-44a9-876w-cd1644472792'&$deltaToken=latest

Also, note that you really shouldn't call the Graph Beta version unless your testing new Graph features. The Beta APIs can and will see breaking changes occur without warning. It is not safe for production code.

Upvotes: 1

Related Questions