DRAG DROP
You are developing in application named App1.
App1 needs to use the Microsoft Graph API to retrieve emails from Microsoft 365 for the current signed-in user.
The solution must meet the following requirements:
✑ Emails that have attachments and are from [email protected] must be retrieved.
✑ The results must show the subject of the email, the sender address, and the count of emails retrieved.
How should you complete the URI to retrieve the results? To answer, drag the appropriate values to the correct targets. Each value may be used once, more than once, or not at all. You may need to drag the split bar between panes or scroll to view content. NOTE: Each correct selection is worth one point.
Answer:
Explanation:
Box 1: $count
Use $count as a query parameter to include a count of the total number of items in a collection alongside the page of data values returned from the Graph, as in the following example:
GET https://graph.microsoft.com/v1.0/me/contacts?$count=true
Box 2: $select
To specify a different set of properties to return than the default set provided by the Graph, use the $select query option. The $select option allows for choosing a subset or superset of the default set returned.
Box 3: $filter
To filter the response data based on a set of criteria, use the $filter query option.
The following example returns messages that have the address field of the from property equal to “[email protected]”.
The from property is of the complex type emailAddress.
GET https://graph.microsoft.com/v1.0/me/messages?$filter=from/emailAddress/address eq ‘[email protected]’
Reference: https://developer.microsoft.com/en-us/graph/docs/overview/query_parameters
Leave a Reply