Edit

Share via


Update place

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 that can be a building, floor, section, desk, room, workspace, or roomList. You can identify the place by specifying the id 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}

Note: {id} is the unique identifier of the place to update.

Request headers

Name Description
Authorization Bearer {token}. Required. Learn more about authentication and authorization.
Content-Type application/json. Required.

Request body

In the request body, supply only the values for properties 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.

The following table specifies the properties that can be updated.

Only one instance of a place resource can be updated at a time. In the request body, use @odata.type to specify the type of place and include the properties to update.

Note

You can't use this API to update the id, placeId, emailAddress, displayName, or bookingType of a place object.

Property Type Description
address physicalAddress The physical address of the place, including the street, city, state, country or region, and postal code. Optional.
geoCoordinates outlookGeoCoordinates Specifies the place location in latitude, longitude, and (optionally) altitude coordinates. Optional.
isWheelChairAccessible Boolean Indicates whether the place is wheelchair accessible. Required.
label String User-defined description of the place. Optional.
parentId String id of a parent place. Optional.
phone String The phone number of the place. Optional.
tags String collection Custom tags that are associated with the place for categorization or filtering. Required.

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 building

The following example shows how to update a building object.

Request

The following example shows a request.

PATCH https://graph.microsoft.com/beta/places/e18a8e21-0494-4296-a5bc-f848dba2740d
Content-Type: application/json

{
  "@odata.type": "microsoft.graph.building",
  "tags": ["most popular building"]
}

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.type": "#microsoft.graph.building",
  "id": "e18a8e21-0494-4296-a5bc-f848dba2740d",
  "placeId": "e18a8e21-0494-4296-a5bc-f848dba2740d",
  "displayName": "MRS",
  "phone": "8801733457",
  "tags": [
    "most popular building"
  ],
  "isWheelChairAccessible": true,
  "label": "this is a building not open to all",
  "hasWiFi": false,
  "geoCoordinates": {
    "latitude": 31.2513263,
    "longitude": 121.3912291,
    "accuracy": null,
    "altitude": null,
    "altitudeAccuracy": null
  },
  "resourceLinks": []
}

Example 2: Update a floor

The following example shows how to update a floor object.

Request

The following example shows a request.

PATCH https://graph.microsoft.com/beta/places/c64205d0-1a2d-4cfe-9012-3f5d668d28ea
Content-Type: application/json

{
  "@odata.type": "microsoft.graph.floor",
  "isWheelChairAccessible": true,
  "sortOrder": 2
}

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.type": "#microsoft.graph.floor",
  "id": "c64205d0-1a2d-4cfe-9012-3f5d668d28ea",
  "placeId": "c64205d0-1a2d-4cfe-9012-3f5d668d28ea",
  "displayName": "Floor X",
  "parentId": "be7b53f1-7c63-4533-91d4-52c3ca856afb",
  "isWheelChairAccessible": true,
  "sortOrder": 2,
  "geoCoordinates": {
    "latitude": 0.0,
    "longitude": 0.0,
    "accuracy": null,
    "altitude": null,
    "altitudeAccuracy": null
  }
}

Example 3: Update a section

The following example shows how to update a section object.

Request

The following example shows a request.

PATCH https://graph.microsoft.com/beta/places/3e7160bb-75da-4456-ab3c-5ee061f4611a
Content-Type: application/json

{
  "@odata.type": "microsoft.graph.section",
  "label": "discuss area"
}

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.type": "#microsoft.graph.section",
  "id": "3e7160bb-75da-4456-ab3c-5ee061f4611a",
  "placeId": "3e7160bb-75da-4456-ab3c-5ee061f4611a",
  "displayName": "section_1",
  "parentId": "e30d4c71-95bf-4576-be4f-b6b7a8d2eeb7",
  "isWheelChairAccessible": false,
  "label": "discuss area"
}

Example 4: Update a desk

The following example shows how to update a desk object.

Request

The following example shows a request.

PATCH https://graph.microsoft.com/beta/places/530f7900-8063-4daf-9cc1-168cb3ac26e9
Content-Type: application/json

{
  "@odata.type": "microsoft.graph.desk",
  "mode": {
    "@odata.type": "microsoft.graph.dropInPlaceMode"
  }
}

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.type": "#microsoft.graph.desk",
  "id": "530f7900-8063-4daf-9cc1-168cb3ac26e9",
  "placeId": "530f7900-8063-4daf-9cc1-168cb3ac26e9",
  "displayName": "desk 5",
  "parentId": "ca163ae1-14a3-4e2a-8a97-5f82d672186f",
  "isWheelChairAccessible": true,
  "mailboxDetails": {
    "externalDirectoryObjectId": "04c6ff74-9268-41aa-96b5-5637d9f039bf",
    "emailAddress": "desk5ca86f9b61753443541750@contoso.com"
  },
  "mode": {
    "@odata.type": "#microsoft.graph.dropInPlaceMode"
  }
}

Example 5: Update a room

The following example shows how to update a room object.

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
}

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 6: Update a workspace

The following example shows how to update a workspace object.

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
}

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 7: Update a room list

The following example shows how to update a roomList object.

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
  }
}

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"
}