Namespace: microsoft.graph
Important
APIs under the /beta
version in Microsoft Graph are subject to change. Use of these APIs in production applications is not supported. To determine whether an API is available in v1.0, use the Version selector.
Update the properties of place object, which can be a room, workspace, or roomList. You can identify the room, workspace, or roomList by specifying the id or emailAddress property.
This API is available in the following national cloud deployments.
Global service |
US Government L4 |
US Government L5 (DOD) |
China operated by 21Vianet |
✅ |
✅ |
✅ |
✅ |
Permissions
Choose the permission or permissions marked as least privileged for this API. Use a higher privileged permission or permissions only if your app requires it. For details about delegated and application permissions, see Permission types. To learn more about these permissions, see the permissions reference.
Permission type |
Least privileged permissions |
Higher privileged permissions |
Delegated (work or school account) |
Place.ReadWrite.All |
Not available. |
Delegated (personal Microsoft account) |
Not supported. |
Not supported. |
Application |
Place.ReadWrite.All |
Not available. |
HTTP request
PATCH /places/{id | emailAddress}
Request body
In the request body, supply the values for relevant fields that should be updated. Only one instance of a place resource (room, workspace, or roomList) can be updated at a time. In the request body, use @odata.type
to specify the type of place, and include the properties of that type to update. Existing properties that aren't included in the request body maintain their previous values or are recalculated based on changes to other property values. For best performance, don't include existing values that haven't changed.
Note: You can't use this API to update the id, emailAddress, displayName, or bookingType, or placeId of a place object.
Property |
Type |
Description |
address |
physicalAddress |
The street address of the room, workspace, or roomlist. |
audioDeviceName |
String |
Specifies the name of the audio device in the room. |
bookingType |
bookingType |
Type of room. Possible values are Standard and Reserved . |
building |
String |
Specifies the building name or building number that the room or workspace is in. |
capacity |
Int32 |
Specifies the capacity of the room or workspace. |
displayDeviceName |
String |
Specifies the name of the display device in the room. |
floorLabel |
String |
Specifies the floor letter that the room or workspace is on. |
floorNumber |
Int32 |
Specifies the floor number that the room or workspace is on. |
geoCoordinates |
outlookGeoCoordinates |
Specifies the room, workspace, or roomlist location in latitude, longitude and optionally, altitude coordinates. |
isWheelChairAccessible |
Boolean |
Specifies whether the room or workspace is wheelchair accessible. |
label |
String |
Specifies a descriptive label for the room or workspace, for example, a number or name. |
nickname |
String |
Specifies a nickname for the room or workspace, for example, "conf room". |
phone |
String |
The phone number of the room, workspace, or roomlist. |
tags |
String collection |
Specifies additional features of the room or workspace, for example, details like the type of view or furniture type. |
videoDeviceName |
String |
Specifies the name of the video device in the room. |
Response
If successful, this method returns a 200 OK
response code and an updated place object in the response body.
Examples
Example 1: Update a room
Request
The following example shows a request.
PATCH https://graph.microsoft.com/beta/places/cf100@contoso.com
Content-type: application/json
{
"@odata.type": "microsoft.graph.room",
"nickname": "Conf Room",
"building": "1",
"label": "100",
"capacity": 50,
"isWheelChairAccessible": false
}
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Beta.Models;
var requestBody = new Room
{
OdataType = "microsoft.graph.room",
Nickname = "Conf Room",
Building = "1",
Label = "100",
Capacity = 50,
IsWheelChairAccessible = false,
};
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.Places["{place-id}"].PatchAsync(requestBody);
mgc-beta places patch --place-id {place-id} --body '{\
"@odata.type": "microsoft.graph.room",\
"nickname": "Conf Room",\
"building": "1",\
"label": "100",\
"capacity": 50,\
"isWheelChairAccessible": false\
}\
'
// Code snippets are only available for the latest major version. Current major version is $v0.*
// Dependencies
import (
"context"
msgraphsdk "github.com/microsoftgraph/msgraph-beta-sdk-go"
graphmodels "github.com/microsoftgraph/msgraph-beta-sdk-go/models"
//other-imports
)
requestBody := graphmodels.NewPlace()
nickname := "Conf Room"
requestBody.SetNickname(&nickname)
building := "1"
requestBody.SetBuilding(&building)
label := "100"
requestBody.SetLabel(&label)
capacity := int32(50)
requestBody.SetCapacity(&capacity)
isWheelChairAccessible := false
requestBody.SetIsWheelChairAccessible(&isWheelChairAccessible)
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
places, err := graphClient.Places().ByPlaceId("place-id").Patch(context.Background(), requestBody, nil)
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
Room place = new Room();
place.setOdataType("microsoft.graph.room");
place.setNickname("Conf Room");
place.setBuilding("1");
place.setLabel("100");
place.setCapacity(50);
place.setIsWheelChairAccessible(false);
Place result = graphClient.places().byPlaceId("{place-id}").patch(place);
const options = {
authProvider,
};
const client = Client.init(options);
const place = {
'@odata.type': 'microsoft.graph.room',
nickname: 'Conf Room',
building: '1',
label: '100',
capacity: 50,
isWheelChairAccessible: false
};
await client.api('/places/cf100@contoso.com')
.version('beta')
.update(place);
<?php
use Microsoft\Graph\Beta\GraphServiceClient;
use Microsoft\Graph\Beta\Generated\Models\Room;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new Room();
$requestBody->setOdataType('microsoft.graph.room');
$requestBody->setNickname('Conf Room');
$requestBody->setBuilding('1');
$requestBody->setLabel('100');
$requestBody->setCapacity(50);
$requestBody->setIsWheelChairAccessible(false);
$result = $graphServiceClient->places()->byPlaceId('place-id')->patch($requestBody)->wait();
Import-Module Microsoft.Graph.Beta.Calendar
$params = @{
"@odata.type" = "microsoft.graph.room"
nickname = "Conf Room"
building = "1"
label = "100"
capacity =
isWheelChairAccessible = $false
}
Update-MgBetaPlace -PlaceId $placeId -BodyParameter $params
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph_beta import GraphServiceClient
from msgraph_beta.generated.models.room import Room
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = Room(
odata_type = "microsoft.graph.room",
nickname = "Conf Room",
building = "1",
label = "100",
capacity = 50,
is_wheel_chair_accessible = False,
)
result = await graph_client.places.by_place_id('place-id').patch(request_body)
Response
The following example shows 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/beta/$metadata#places/$entity",
"@odata.type": "#microsoft.graph.room",
"id": "3162F1E1-C4C0-604B-51D8-91DA78989EB1",
"emailAddress": "cf100@contoso.com",
"displayName": "Conf Room 100",
"address": {
"street": "4567 Main Street",
"city": "Buffalo",
"state": "NY",
"postalCode": "98052",
"countryOrRegion": "USA"
},
"geoCoordinates": {
"latitude": 47.0,
"longitude": -122.0
},
"phone": "555-555-0100",
"nickname": "Conf Room",
"label": "100",
"capacity": 50,
"building": "1",
"floorLabel": "1P",
"floorNumber": 1,
"isWheelChairAccessible": false,
"bookingType": "standard",
"tags": [
"bean bags"
],
"audioDeviceName": null,
"videoDeviceName": null,
"displayDeviceName": "surface hub",
"placeId": "080ed1a0-7b54-4995-85a5-eeec751786f5"
}
Example 2: Update a workspace
Request
The following example shows a request.
PATCH https://graph.microsoft.com/beta/places/ws100@contoso.com
Content-type: application/json
{
"@odata.type": "microsoft.graph.workspace",
"nickname": "Conf Room",
"building": "1",
"label": "100",
"capacity": 50,
"isWheelChairAccessible": false
}
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Beta.Models;
var requestBody = new Workspace
{
OdataType = "microsoft.graph.workspace",
Nickname = "Conf Room",
Building = "1",
Label = "100",
Capacity = 50,
IsWheelChairAccessible = false,
};
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.Places["{place-id}"].PatchAsync(requestBody);
mgc-beta places patch --place-id {place-id} --body '{\
"@odata.type": "microsoft.graph.workspace",\
"nickname": "Conf Room",\
"building": "1",\
"label": "100",\
"capacity": 50,\
"isWheelChairAccessible": false\
}\
'
// Code snippets are only available for the latest major version. Current major version is $v0.*
// Dependencies
import (
"context"
msgraphsdk "github.com/microsoftgraph/msgraph-beta-sdk-go"
graphmodels "github.com/microsoftgraph/msgraph-beta-sdk-go/models"
//other-imports
)
requestBody := graphmodels.NewPlace()
nickname := "Conf Room"
requestBody.SetNickname(&nickname)
building := "1"
requestBody.SetBuilding(&building)
label := "100"
requestBody.SetLabel(&label)
capacity := int32(50)
requestBody.SetCapacity(&capacity)
isWheelChairAccessible := false
requestBody.SetIsWheelChairAccessible(&isWheelChairAccessible)
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
places, err := graphClient.Places().ByPlaceId("place-id").Patch(context.Background(), requestBody, nil)
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
Workspace place = new Workspace();
place.setOdataType("microsoft.graph.workspace");
place.setNickname("Conf Room");
place.setBuilding("1");
place.setLabel("100");
place.setCapacity(50);
place.setIsWheelChairAccessible(false);
Place result = graphClient.places().byPlaceId("{place-id}").patch(place);
const options = {
authProvider,
};
const client = Client.init(options);
const place = {
'@odata.type': 'microsoft.graph.workspace',
nickname: 'Conf Room',
building: '1',
label: '100',
capacity: 50,
isWheelChairAccessible: false
};
await client.api('/places/ws100@contoso.com')
.version('beta')
.update(place);
<?php
use Microsoft\Graph\Beta\GraphServiceClient;
use Microsoft\Graph\Beta\Generated\Models\Workspace;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new Workspace();
$requestBody->setOdataType('microsoft.graph.workspace');
$requestBody->setNickname('Conf Room');
$requestBody->setBuilding('1');
$requestBody->setLabel('100');
$requestBody->setCapacity(50);
$requestBody->setIsWheelChairAccessible(false);
$result = $graphServiceClient->places()->byPlaceId('place-id')->patch($requestBody)->wait();
Import-Module Microsoft.Graph.Beta.Calendar
$params = @{
"@odata.type" = "microsoft.graph.workspace"
nickname = "Conf Room"
building = "1"
label = "100"
capacity =
isWheelChairAccessible = $false
}
Update-MgBetaPlace -PlaceId $placeId -BodyParameter $params
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph_beta import GraphServiceClient
from msgraph_beta.generated.models.workspace import Workspace
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = Workspace(
odata_type = "microsoft.graph.workspace",
nickname = "Conf Room",
building = "1",
label = "100",
capacity = 50,
is_wheel_chair_accessible = False,
)
result = await graph_client.places.by_place_id('place-id').patch(request_body)
Response
The following example shows 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/beta/$metadata#places/$entity",
"@odata.type": "#microsoft.graph.workspace",
"id": "3162F1E1-C4C0-604B-51D8-91DA78989EB1",
"emailAddress": "ws100@contoso.com",
"displayName": "Workspace 100",
"address": {
"street": "4567 Main Street",
"city": "Buffalo",
"state": "NY",
"postalCode": "98052",
"countryOrRegion": "USA"
},
"geoCoordinates": {
"latitude": 47.0,
"longitude": -122.0
},
"phone": "555-555-0100",
"nickname": "Workspace",
"label": "100",
"capacity": 50,
"building": "1",
"floorLabel": "1P",
"floorNumber": 1,
"isWheelChairAccessible": false,
"tags": [
"bean bags"
],
"placeId": "357e8ddc-8af5-4c7c-bc38-ddb3bcfec0d9"
}
Example 3: Update a roomlist
Request
The following example shows a request.
PATCH https://graph.microsoft.com/beta/places/Building1RroomList@contoso.com
Content-type: application/json
{
"@odata.type": "microsoft.graph.roomList",
"displayName": "Building 1",
"phone":"555-555-0100",
"address": {
"street": "4567 Main Street",
"city": "Buffalo",
"state": "NY",
"postalCode": "98052",
"countryOrRegion": "USA"
},
"geoCoordinates": {
"altitude": null,
"latitude": 47.0,
"longitude": -122.0,
"accuracy": null,
"altitudeAccuracy": null
}
}
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Beta.Models;
var requestBody = new RoomList
{
OdataType = "microsoft.graph.roomList",
DisplayName = "Building 1",
Phone = "555-555-0100",
Address = new PhysicalAddress
{
Street = "4567 Main Street",
City = "Buffalo",
State = "NY",
PostalCode = "98052",
CountryOrRegion = "USA",
},
GeoCoordinates = new OutlookGeoCoordinates
{
Altitude = null,
Latitude = 47d,
Longitude = -122d,
Accuracy = null,
AltitudeAccuracy = null,
},
};
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.Places["{place-id}"].PatchAsync(requestBody);
mgc-beta places patch --place-id {place-id} --body '{\
"@odata.type": "microsoft.graph.roomList",\
"displayName": "Building 1",\
"phone":"555-555-0100",\
"address": {\
"street": "4567 Main Street",\
"city": "Buffalo",\
"state": "NY",\
"postalCode": "98052",\
"countryOrRegion": "USA"\
},\
"geoCoordinates": {\
"altitude": null,\
"latitude": 47.0,\
"longitude": -122.0,\
"accuracy": null,\
"altitudeAccuracy": null\
}\
}\
'
// Code snippets are only available for the latest major version. Current major version is $v0.*
// Dependencies
import (
"context"
msgraphsdk "github.com/microsoftgraph/msgraph-beta-sdk-go"
graphmodels "github.com/microsoftgraph/msgraph-beta-sdk-go/models"
//other-imports
)
requestBody := graphmodels.NewPlace()
displayName := "Building 1"
requestBody.SetDisplayName(&displayName)
phone := "555-555-0100"
requestBody.SetPhone(&phone)
address := graphmodels.NewPhysicalAddress()
street := "4567 Main Street"
address.SetStreet(&street)
city := "Buffalo"
address.SetCity(&city)
state := "NY"
address.SetState(&state)
postalCode := "98052"
address.SetPostalCode(&postalCode)
countryOrRegion := "USA"
address.SetCountryOrRegion(&countryOrRegion)
requestBody.SetAddress(address)
geoCoordinates := graphmodels.NewOutlookGeoCoordinates()
altitude := null
geoCoordinates.SetAltitude(&altitude)
latitude := float64(47)
geoCoordinates.SetLatitude(&latitude)
longitude := float64(-122)
geoCoordinates.SetLongitude(&longitude)
accuracy := null
geoCoordinates.SetAccuracy(&accuracy)
altitudeAccuracy := null
geoCoordinates.SetAltitudeAccuracy(&altitudeAccuracy)
requestBody.SetGeoCoordinates(geoCoordinates)
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
places, err := graphClient.Places().ByPlaceId("place-id").Patch(context.Background(), requestBody, nil)
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
RoomList place = new RoomList();
place.setOdataType("microsoft.graph.roomList");
place.setDisplayName("Building 1");
place.setPhone("555-555-0100");
PhysicalAddress address = new PhysicalAddress();
address.setStreet("4567 Main Street");
address.setCity("Buffalo");
address.setState("NY");
address.setPostalCode("98052");
address.setCountryOrRegion("USA");
place.setAddress(address);
OutlookGeoCoordinates geoCoordinates = new OutlookGeoCoordinates();
geoCoordinates.setAltitude(null);
geoCoordinates.setLatitude(47d);
geoCoordinates.setLongitude(-122d);
geoCoordinates.setAccuracy(null);
geoCoordinates.setAltitudeAccuracy(null);
place.setGeoCoordinates(geoCoordinates);
Place result = graphClient.places().byPlaceId("{place-id}").patch(place);
const options = {
authProvider,
};
const client = Client.init(options);
const place = {
'@odata.type': 'microsoft.graph.roomList',
displayName: 'Building 1',
phone: '555-555-0100',
address: {
street: '4567 Main Street',
city: 'Buffalo',
state: 'NY',
postalCode: '98052',
countryOrRegion: 'USA'
},
geoCoordinates: {
altitude: null,
latitude: 47.0,
longitude: -122.0,
accuracy: null,
altitudeAccuracy: null
}
};
await client.api('/places/Building1RroomList@contoso.com')
.version('beta')
.update(place);
<?php
use Microsoft\Graph\Beta\GraphServiceClient;
use Microsoft\Graph\Beta\Generated\Models\RoomList;
use Microsoft\Graph\Beta\Generated\Models\PhysicalAddress;
use Microsoft\Graph\Beta\Generated\Models\OutlookGeoCoordinates;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new RoomList();
$requestBody->setOdataType('microsoft.graph.roomList');
$requestBody->setDisplayName('Building 1');
$requestBody->setPhone('555-555-0100');
$address = new PhysicalAddress();
$address->setStreet('4567 Main Street');
$address->setCity('Buffalo');
$address->setState('NY');
$address->setPostalCode('98052');
$address->setCountryOrRegion('USA');
$requestBody->setAddress($address);
$geoCoordinates = new OutlookGeoCoordinates();
$geoCoordinates->setAltitude(null);
$geoCoordinates->setLatitude(47);
$geoCoordinates->setLongitude(-122);
$geoCoordinates->setAccuracy(null);
$geoCoordinates->setAltitudeAccuracy(null);
$requestBody->setGeoCoordinates($geoCoordinates);
$result = $graphServiceClient->places()->byPlaceId('place-id')->patch($requestBody)->wait();
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph_beta import GraphServiceClient
from msgraph_beta.generated.models.room_list import RoomList
from msgraph_beta.generated.models.physical_address import PhysicalAddress
from msgraph_beta.generated.models.outlook_geo_coordinates import OutlookGeoCoordinates
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = RoomList(
odata_type = "microsoft.graph.roomList",
display_name = "Building 1",
phone = "555-555-0100",
address = PhysicalAddress(
street = "4567 Main Street",
city = "Buffalo",
state = "NY",
postal_code = "98052",
country_or_region = "USA",
),
geo_coordinates = OutlookGeoCoordinates(
altitude = None,
latitude = 47,
longitude = -122,
accuracy = None,
altitude_accuracy = None,
),
)
result = await graph_client.places.by_place_id('place-id').patch(request_body)
Response
The following example shows 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/beta/$metadata#places/$entity",
"@odata.type": "#microsoft.graph.roomList",
"id": "DC404124-302A-92AA-F98D-7B4DEB0C1705",
"displayName": "Building 1",
"address": {
"street": "4567 Main Street",
"city": "Buffalo",
"state": "NY",
"postalCode": "98052",
"countryOrRegion": "USA"
},
"geoCoordinates": {
"altitude": null,
"latitude": 47.0,
"longitude": -122.0,
"accuracy": null,
"altitudeAccuracy": null
},
"phone": "555-555-0100",
"emailAddress": "bldg1@contoso.com",
"placeId": "406bd1b2-237c-4710-bda2-8b7900d61b27"
}