Exam4Training

Which query should you use?

You are developing a human resources application that will show users where they are in their company’s organization chart.

You are adding a new feature that will display the name of a user’s manager inside the application.

You need to create a REST query to retrieve the information. The solution must minimize the amount of data retrieved.

Which query should you use?
A . GET https://graph.microsoft.com/v1.0/users/{UserPricipalName}/manager?$select=displayName
B . GET https://graph.microsoft.com/v1.0/users/{UserPricipalName}/people?$filter=jobTitle eq ‘manager’&$select=displayName
C . GET https://graph.microsoft.com/v1.0/users/{UserPricipalName}/contacts?$filter=jobTitle eq ‘manager’
D . GET https://graph.microsoft.com/v1.0/users/{UserPricipalName}/manager

Answer: A

Explanation:

Get user’s manager. Returns the user or organizational contact assigned as the user’s manager.

Syntax:

GET /me/manager

GET /users/{id | userPrincipalName}/manager

Only the name of the user’s manager should be displayed so we use ?select=displayname

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.

References: https://docs.microsoft.com/en-us/graph/api/user-list-manager

https://developer.microsoft.com/en-us/graph/docs/overview/query_parameters

Latest MS-600 Dumps Valid Version with 142 Q&As

Latest And Valid Q&A | Instant Download | Once Fail, Full Refund

Exit mobile version