1
votes

I am attempting to get a list of room resources from the Microsoft Graph API using the list places endpoint at https://graph.microsoft.com/beta/places/microsoft.graph.room (see docs).

I am getting a response back that says: {"code":"invalid_permissions","message":"place.read.all permission is required to read company places, scopes/roles provided: Calendars.ReadWrite IsAppOnly:True"}

I am getting this error from both the Microsoft Graph API Explorer and from a backend service using client credentials to access the data in a another tenant that has approved the requested scopes.

I have inspected the OAuth token and it includes the "Place.Read.All" scope from both the Microsoft Graph API Explorer and from my service:

For the Graph API Explorer

> jwt {access_token}
* Payload
{
  ...
  "scp": "
    Calendars.ReadWrite 
    Contacts.ReadWrite 
    Directory.Read.All 
    Directory.ReadWrite.All 
    Files.ReadWrite.All 
    Mail.ReadWrite 
    Notes.ReadWrite.All 
    openid 
    People.Read 
    Place.Read.All 
    profile 
    Sites.ReadWrite.All 
    Tasks.ReadWrite 
    User.ReadBasic.All 
    User.ReadWrite 
    email"
  ...
}

For my service

> jwt {access_token}
* Payload
{
 ...
 "roles": [
    "Place.Read.All",
    "User.Read.All",
    "Calendars.ReadWrite"
  ],
 ...
}
1
+1 -- and I also can't find any workaround to this. The list users endpoint returns rooms and users alike but there's no way to tell them apart; the v1 API doesn't have the concept of a room at all; the Beta API also has a findRooms endpoint, but it's also broken because it doesn't include the nextLink value, so it can only return the first 100 addresses. How can one get a list of rooms of any sort? - psg-1
What is strange is that this endpoint was working a few days ago, both in my service and in the Graph API explorer, and now I get this error. I am assuming its a bug Microsoft introduced but this is the only method I have of reporting issues :/ - bpedman
And yeah, I was hoping to use the list users endpoint as well but the isResourceAccount is always null :( - bpedman

1 Answers

-1
votes

You can use another api to get the locations. GET https://graph.microsoft.com/beta/me/findRoomLists GET /me/findRooms(RoomList='{room_list_emailAddress}') It responsed a simple result, have not capacity info and the others.