Setting headers on Graph API request
Last updated on
19 May 2023
There is a possibility to add headers to your custom request to the Office 365 Graph API. For an example, see below:
<?php
// Add ConsistencyLevel: eventual to the header.
$headers = [
'ConsistencyLevel' => 'eventual',
];
$UsersData['manager-tree'] = $this->o365Graph->getGraphData('/users/' . $user_id . '/?expand=manager($levels=50;$select=id,displayName)&$count=true', 'GET', FALSE, 'beta', [], FALSE, $headers);Help improve this page
Page status: No known problems
You can:
You can:
- Log in, click Edit, and edit this page
- Log in, click Discuss, update the Page status value, and suggest an improvement
- Log in and create a Documentation issue with your suggestion