Microsoft Graph API FindRooms ErrorAccessDenied

Viewed 3973

We are trying to fetch a list of rooms in the organization via user_findrooms on the beta API.

I am using the php-connect-sample and was directed here after creating an issue there.

Our application is registered, and has the required permissions. The user is logged in and redirected correctly. I can successfully get the /me endpoint

When I try to get the /me/findRooms endpoint like this:

$graph = new Graph();
$graph->setApiVersion('beta');
$graph->setAccessToken($_SESSION['access_token']);

$rooms = $graph->createRequest("get", "/me/findRooms")
                        ->setReturnType(Model\EmailAddress::class)
                        ->execute();

Then I get the following error:

Client error: GET https://graph.microsoft.com/beta/me/findRooms resulted in a 403 Forbidden response: { "error": { "code": "ErrorAccessDenied", "message": "Access is denied. Check credentials and try again.", (truncated...)

So it seems to be a permissions error.

We have the following Graph permissions for our app:

Delegated Permissions: User.ReadBasic.All and User.Read.All

Application Permissions: Calendars.ReadWrite and User.Read.All

Which additional permissions are required to access /me/findRooms?

1 Answers
Related