MSGraph partner events, only return changed values

Alistair Young 51 Reputation points
2025-04-02T08:21:44.7766667+00:00

I'm receiving user upated events from Entra via an MSGraph partner topic but it always returns all attributes from a call to GetAsDeltaGetResponseAsync, regardless of whether they have change or not.

var userChanges = await graphServiceClient.Users.Delta.GetAsDeltaGetResponseAsync((requestConfiguration) =>
{
	requestConfiguration.QueryParameters.Filter = $"id eq ('{cloudData.ResourceData!.Id}')";
	requestConfiguration.Headers.Add("ConsistencyLevel", "eventual");
	requestConfiguration.Headers.Add("Prefer", "return=minimal");
	requestConfiguration.QueryParameters.Count = true;
	requestConfiguration.QueryParameters.Select = ["id,userPrincipalName,givenName,surname,displayName,mail,mailNickname,employeeId,employeeType,jobTitle,mobilePhone,officeLocation,postalCode,onPremisesSamAccountName,onPremisesUserPrincipalName,ageGroup,businessPhones,proxyAddresses,onPremisesExtensionAttributes"];
});

the return=minimal header doesn't seem to do anything and all attributes are returned fully populated even if they weren't updated in Entra. Is there a way to do a query from a notification event handler to only get the changed attributes?

In the response I see this:

  "BackingStore":
  {
    "InitializationCompleted":false,
    "ReturnOnlyChangedValues":false
  },

I only want the values of the changed attributes.

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
13,498 questions
0 comments No comments
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.