Get place
Article
07/27/2022
3 minutes to read
8 contributors
In this article
Namespace: microsoft.graph
Get the properties and relationships of a place object specified by either its ID or email address.
The place object can be one of the following types:
A room which includes rich properties such as an email address for the room, and accessibility, capacity, and device support.
A room list which includes an email address for the room list, and a navigation property to get the collection of room instances in that room list.
Both room and roomList are derived from the place object.
Permissions
One of the following permissions is required to call this API. To learn more, including how to choose permissions, see Permissions .
Permission type
Permissions (from least to most privileged)
Delegated (work or school account)
Place.Read.All
Delegated (personal Microsoft account)
Not supported
Application
Place.Read.All
HTTP request
GET /places/{id}
Optional query parameters
Use $select
to get specific place properties.
For more information, see OData query parameters .
Name
Description
Authorization
Bearer {token}. Required.
Request body
Do not supply a request body for this method.
Response
If successful, this method returns a 200 OK
response code and the requested place object in the response body.
Examples
Example 1: Get a room
Request
The following example specifies the id of a room to get its properties.
GET https://graph.microsoft.com/v1.0/places/979e9793-3e91-40eb-b18c-0ea937893956
GraphServiceClient graphClient = new GraphServiceClient( authProvider );
var place = await graphClient.Places["{place-id}"]
.Request()
.GetAsync();
For details about how to add the SDK to your project and create an authProvider instance, see the SDK documentation .
const options = {
authProvider,
};
const client = Client.init(options);
let place = await client.api('/places/979e9793-3e91-40eb-b18c-0ea937893956')
.get();
For details about how to add the SDK to your project and create an authProvider instance, see the SDK documentation .
GraphServiceClient graphClient = GraphServiceClient.builder().authenticationProvider( authProvider ).buildClient();
Place place = graphClient.places("979e9793-3e91-40eb-b18c-0ea937893956")
.buildRequest()
.get();
For details about how to add the SDK to your project and create an authProvider instance, see the SDK documentation .
//THE GO SDK IS IN PREVIEW. NON-PRODUCTION USE ONLY
graphClient := msgraphsdk.NewGraphServiceClient(requestAdapter)
result, err := graphClient.PlacesById("place-id").Get()
For details about how to add the SDK to your project and create an authProvider instance, see the SDK documentation .
<?php
// THIS SNIPPET IS A PREVIEW FOR THE KIOTA BASED SDK. NON-PRODUCTION USE ONLY
$graphServiceClient = new GraphServiceClient($requestAdapter);
$requestResult = $graphServiceClient->placesById('place-id')->get();
For details about how to add the SDK to your project and create an authProvider instance, see the SDK documentation .
Response
The following is an example of the response.
Note : The response object shown here might be shortened for readability.
HTTP/1.1 200 OK
Content-type: application/json
{
"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#places/$entity",
"@odata.type": "#microsoft.graph.roomList",
"id": "979e9793-3e91-40eb-b18c-0ea937893956",
"displayName": "Building 2 Rooms",
"address": null,
"geoCoordinates": null,
"phone": "",
"emailAddress": "Building2Rooms@M365x214355.onmicrosoft.com"
}
Example 2: Get a room list
Request
The following example specifies the emailAddress of a roomList to get its properties.
GET https://graph.microsoft.com/v1.0/places/Building2Rooms@M365x214355.onmicrosoft.com
GraphServiceClient graphClient = new GraphServiceClient( authProvider );
var place = await graphClient.Places["{place-id}"]
.Request()
.GetAsync();
For details about how to add the SDK to your project and create an authProvider instance, see the SDK documentation .
const options = {
authProvider,
};
const client = Client.init(options);
let place = await client.api('/places/Building2Rooms@M365x214355.onmicrosoft.com')
.get();
For details about how to add the SDK to your project and create an authProvider instance, see the SDK documentation .
GraphServiceClient graphClient = GraphServiceClient.builder().authenticationProvider( authProvider ).buildClient();
Place place = graphClient.places("Building2Rooms@M365x214355.onmicrosoft.com")
.buildRequest()
.get();
For details about how to add the SDK to your project and create an authProvider instance, see the SDK documentation .
//THE GO SDK IS IN PREVIEW. NON-PRODUCTION USE ONLY
graphClient := msgraphsdk.NewGraphServiceClient(requestAdapter)
result, err := graphClient.PlacesById("place-id").Get()
For details about how to add the SDK to your project and create an authProvider instance, see the SDK documentation .
<?php
// THIS SNIPPET IS A PREVIEW FOR THE KIOTA BASED SDK. NON-PRODUCTION USE ONLY
$graphServiceClient = new GraphServiceClient($requestAdapter);
$requestResult = $graphServiceClient->placesById('place-id')->get();
For details about how to add the SDK to your project and create an authProvider instance, see the SDK documentation .
Response
The following is an example of the response.
Note : The response object shown here might be shortened for readability.
HTTP/1.1 200 OK
Content-type: application/json
{
"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#places/$entity",
"@odata.type": "#microsoft.graph.roomList",
"id": "979e9793-3e91-40eb-b18c-0ea937893956",
"displayName": "Building 2 Rooms",
"address": null,
"geoCoordinates": null,
"phone": "",
"emailAddress": "Building2Rooms@M365x214355.onmicrosoft.com"
}