You are developing an application that will track changes to the UserPrincipalName attribute of Microsoft 365 accounts.
You need to use a REST request to retrieve the information by using Microsoft Graph. The solution must minimize the amount of data retrieved.
What should you do?
A. Use GET https://graph.microsoft.com/v1.0/users/delta for the first call. Use the state token in subsequent calls.
B. Use GET https://graph.microsoft.com/v1.0/users/delta?$select=UserPrincipalName for the first call. Use the state token in subsequent calls.
C. Use GET https://graph.microsoft.com/v1.0/users$select=UserPrincipalName for the calls and track the changes.
D. Use GET https://graph.microsoft.com/v1.0/users for the calls and track the changes.
Explanation:
Use delta query to track changes in a resource collection
The typical call pattern is as follows:
1. The application begins by calling a GET request with the delta function on the desired resource.
2. Microsoft Graph sends a response containing the requested resource and a state token.
Example: Selecting three properties
The next example shows the initial request selecting three properties for change tracking, with default response behavior.
Note: Delta query enables applications to discover newly created, updated, or deleted entities without performing a full read of the target resource with every request.
Incorrect Answers:
A: Example: Default properties
The following is an example of the request. There is no $select parameter, so a default set of properties is tracked and returned.
Reference: https://docs.microsoft.com/en-us/graph/api/user-delta