Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
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.
Create a new place object.
You can also use this method to create the following child object types: building, floor, section, room, workspace, or desk.
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
POST /places
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 a JSON representation of the place object.
For a list of all properties that are available when you create a place object, see the place resource.
Response
If successful, this method returns a 201 Created
response code and a place object in the response body.
Examples
Example 1: Create a building
The following example shows how to create a new building object.
Request
The following example shows a request.
POST https://graph.microsoft.com/beta/places
Content-Type: application/json
{
"@odata.type": "microsoft.graph.building",
"displayName": "B001"
}
Response
The following example shows the response.
Note: The response object shown here might be shortened for readability.
HTTP/1.1 201 Created
Content-Type: application/json
{
"@odata.type": "#microsoft.graph.building",
"id": "767a31a7-6987-41c9-b829-ab351b8aab53",
"placeId": "767a31a7-6987-41c9-b829-ab351b8aab53",
"displayName": "B001"
}
Example 2: Create a floor
The following example shows how to create a new floor object.
Request
The following example shows a request.
POST https://graph.microsoft.com/beta/places
Content-Type: application/json
{
"@odata.type": "microsoft.graph.floor",
"displayName": "F1",
"parentId": "767a31a7-6987-41c9-b829-ab351b8aab53"
}
Response
The following example shows the response.
Note: The response object shown here might be shortened for readability.
HTTP/1.1 201 Created
Content-Type: application/json
{
"@odata.type": "#microsoft.graph.floor",
"id": "46ef7aed-5d94-4fd4-ae03-b333bc7a6955",
"placeId": "46ef7aed-5d94-4fd4-ae03-b333bc7a6955",
"displayName": "F1",
"parentId": "767a31a7-6987-41c9-b829-ab351b8aab53",
"tags": [],
"isWheelChairAccessible": false
}
Example 3: Create a section
The following example shows how to create a new section object.
Request
The following example shows a request.
POST https://graph.microsoft.com/beta/places
Content-Type: application/json
{
"@odata.type": "microsoft.graph.section",
"displayName": "S1",
"parentId": "46ef7aed-5d94-4fd4-ae03-b333bc7a6955"
}
Response
The following example shows the response.
Note: The response object shown here might be shortened for readability.
HTTP/1.1 201 Created
Content-Type: application/json
{
"@odata.type": "#microsoft.graph.section",
"id": "1ad0f725-6885-49c5-9a47-3b22a1f9409d",
"placeId": "1ad0f725-6885-49c5-9a47-3b22a1f9409d",
"displayName": "S1",
"parentId": "46ef7aed-5d94-4fd4-ae03-b333bc7a6955",
"tags": [],
"isWheelChairAccessible": false
}
Example 4: Create a desk
The following example shows how to create a new desk object.
Request
The following example shows a request.
POST https://graph.microsoft.com/beta/places
Content-Type: application/json
{
"@odata.type": "microsoft.graph.desk",
"displayName": "D1",
"parentId": "1ad0f725-6885-49c5-9a47-3b22a1f9409d"
}
Response
The following example shows the response.
Note: The response object shown here might be shortened for readability.
HTTP/1.1 201 Created
Content-Type: application/json
{
"@odata.type": "#microsoft.graph.desk",
"id": "fc25d4dc-817a-45bc-a72d-2616cd7566ac",
"placeId": "fc25d4dc-817a-45bc-a72d-2616cd7566ac",
"displayName": "D1",
"parentId": "1ad0f725-6885-49c5-9a47-3b22a1f9409d",
"tags": [],
"isWheelChairAccessible": false,
"mode": {
"@odata.type": "#microsoft.graph.offlinePlaceMode",
"reason": "New"
}
}
Example 5: Create a room
The following example shows how to create a new room object.
Request
The following example shows a request.
POST https://graph.microsoft.com/beta/places
Content-Type: application/json
{
"@odata.type": "microsoft.graph.room",
"displayName": "Conf Room 4/3.3G11",
"parentId": "46ef7aed-5d94-4fd4-ae03-b333bc7a6955",
"emailAddress": "confroom433G11@contoso.com",
"bookingType": "standard"
}
Response
The following example shows the response.
Note: The response object shown here might be shortened for readability.
HTTP/1.1 201 Created
Content-Type: application/json
{
"@odata.type": "#microsoft.graph.room",
"id": "0be387a4-d53b-410f-9daf-f4fa07e5b05a",
"placeId": "4923e5a8-453e-4edf-b272-9c33757d4fb3",
"displayName": "Conf Room 4/3.3G11",
"parentId": "46ef7aed-5d94-4fd4-ae03-b333bc7a6955",
"isWheelChairAccessible": false,
"emailAddress": "confroom433G11@contoso.com",
"bookingType": "standard"
}
Example 6: Create a workspace
The following example shows how to create a new workspace object.
Request
The following example shows a request.
POST https://graph.microsoft.com/beta/places
Content-Type: application/json
{
"@odata.type": "microsoft.graph.workspace",
"parentId": "f7de7265-e420-47b4-9d49-28d728716241",
"displayName": "testSpace001",
"emailAddress": "frank@contoso.com",
"description": "test for workspace",
"tags": ["test"]
}
Response
The following example shows the response.
Note: The response object shown here might be shortened for readability.
HTTP/1.1 201 Created
Content-Type: application/json
{
"@odata.type": "microsoft.graph.workspace",
"id": "316ae189-e420-47b4-9d49-65c3cal16241",
"placeId": "316ae189-e420-47b4-9d49-65c3cal16241",
"parentId": "f7de7265-e420-47b4-9d49-28d728716241",
"displayName": "testSpace001",
"phone": null,
"emailAddress": "frank@contoso.com",
"description": "test for workspace",
"isWheelChairAccessible": false,
"tags": []
}