1
votes

I am using Microsoft Graph API delta query to track changes in my Azure AD.

I want to obtain only changed properties. So I have set 'ocp-aad-dq-include-only-changed-properties' header value to 'true' to get only changed properties. But even after using this header I am receiving all user properties.

Is there any other option to get only changed properties? or Do I need to use any other header?

Given below the detail description of the operations that I am trying.

Example:

  • Initial Delta request

     GET https://graph.microsoft.com/v1.0/users/delta?$select=displayName,givenName,surname
    

    Headers:

     ocp-aad-dq-include-only-changed-properties : true
    

    Response: In the initial response, I am getting all users.

  • DeltaLink request after updating 'displayName' attribute

     GET https://graph.microsoft.com/v1.0/users/delta?$deltatoken=KhFiGlAZqewNAThmCVnNxqPu5gOBegrm1CaV
    

    Headers:

     ocp-aad-dq-include-only-changed-properties : true
    

    Here I have added 'ocp-aad-dq-include-only-changed-properties' header still I am getting all attributes of the User

    Response:

    {
        "@odata.context": "https://graph.microsoft.com/v1.0/$metadata#users",
        "@odata.deltaLink": "https://graph.microsoft.com/v1.0/users/delta?$deltatoken=o8xFasdpZ7QDP14TyDfj9AeibJxMlXAtgB0Nb",
        "value": [
            {
                "businessPhones": [],
                "displayName": "jhon4",
                "givenName": null,
                "jobTitle": null,
                "mail": null,
                "mobilePhone": null,
                "officeLocation": null,
                "preferredLanguage": null,
                "surname": null,
                "userPrincipalName": "[email protected]",
                "id": "942h93c9-af17-6sad2d98cc8"
            }
        ]
    }
    
  • Update Request

     PATCH https://graph.microsoft.com/v1.0/users/[email protected]
    

    Payload:

    {
      "displayName": "jhon4",
    }
    
2

2 Answers

1
votes

The ocp-aad-dq-include-only-changed-properties header is a feature of the Azure AD Graph API and isn't supported in Microsoft Graph.

While they're extremely similar, these two APIs have several distinct features differences (such as this one). You can read more about the differences (and the overall plan) at Microsoft Graph or the Azure AD Graph.

0
votes

to get only the changed properties, use this header: prefer:return=minimal