Share via

Graph API patch requests on 'place' related entities results in errors

Yuri Vannisselroy 20 Reputation points
2026-03-31T12:36:19.9733333+00:00

I am running into 4 different scenarios where performing a "patch" request via Graph on Place related entities results in an error I did not expect.

  1. Patching a "Building" without setting a "Wifi state" results in error.
    1. Create a new building via Graph without setting the Wifi state -> works fine.
    2. Then try patching the same building via Graph: "ODataError: WifiState cannot be set to Unknown state."
  2. Patching a "Desk" without setting a "Heigh adjustable state" results in error.
    1. Create a new Desk via Graph without setting the Height adjustable state -> works fine.
    2. Then try patching the same Desk via Graph: "ODataError: HeightAdjustableState cannot be set to Unknown state."
  3. Patching a "Room" or "Workspace" results in the following error:
    1. "ODataError: Place id cannot be updated." I did not change the Id, but I did notice that these two types coincidentally have another "placeId" field.
  4. Patching a "Building" 1 or more days after creating it results in the following error:
    1. "ODataError: ServiceMetadata cannot be changed via API." Patching the Building on the day it was created works fine. Also I did not change any values.

I am using v1.0 Graph API (https://learn.microsoft.com/en-us/graph/api/resources/places-api-overview?view=graph-rest-1.0). Could someone help me with these issues or direct to the place to report these?

Microsoft Teams | Development
Microsoft Teams | Development

Building, integrating, or customizing apps and workflows within Microsoft Teams using developer tools and APIs

0 comments No comments

Answer accepted by question author
  1. Teddie-D 13,755 Reputation points Microsoft External Staff Moderator
    2026-03-31T14:24:57.51+00:00

    Hi @Yuri Vannisselroy 

    Thank you for posting your question in the Microsoft Q&A forum. 

    When updating place-related entities with Microsoft Graph, it’s important to understand how PATCH requests handle default values and immutable properties differently from POST operations. 

    Building resource: If you send a PATCH request for a Building without including the wifiState property, the backend interprets the omitted value as the default enum value Unknown. While Unknown is allowed during POST (create) operations, it is not valid for PATCH, causing the request to fail. 

    Workaround: Always include a valid wifiState value in PATCH requests, even if the value is not being changed. 

    Reference: building resource type - Microsoft Graph v1.0 | Microsoft Learn

    Desk resource: The same behavior applies to Desk resources. If heightAdjustableState is omitted in a PATCH request, it is interpreted as Unknown, which PATCH does not allow.

    Workaround: Explicitly include a valid heightAdjustableState value in PATCH requests.   

    Reference: desk resource type - Microsoft Graph v1.0 | Microsoft Learn

    Room and Workspace resources expose a placeId property, which is an immutable unique identifier and cannot be edited.

    You did not change the id, but Microsoft Graph still rejects the PATCH request because the id or placeId property is included in the payload, and PATCH requests must not include immutable identifiers.

    Reference: Microsoft Graph what's new history - Microsoft Graph | Microsoft Learn

    There is currently no official documentation or community discussion explaining why PATCH requests for a Building may start failing with “ServiceMetadata cannot be changed via API” one or more days after creation. As moderators, we cannot investigate backend causes, we can only provide guidance based on public resources and experience. If needed, you can report this issue on Github

    Reference: Participating in a discussion - GitHub Docs

    I hope this information is helpful. 


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".    

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread. 

    1 person found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. Q&A Assist
    2026-03-31T12:36:46.1566667+00:00
    AI generated content. This question contains an answer created with AI from Q&A Assist. Learn more

    All four behaviors are consistent with current Microsoft Graph Places semantics and recent changes, not with anything in the request payloads alone.

    1. Building wifiState and desk heightAdjustableState errors

    Recent changes introduced new state properties on place types:

    • wifiState on building
    • heightAdjustableState on desk

    These are modeled as state enums. The error messages

    • WifiState cannot be set to Unknown state.
    • HeightAdjustableState cannot be set to Unknown state.

    indicate that when issuing a PATCH, the service is treating the missing values as an attempt to set these properties to an Unknown enum value, which is not allowed on update.

    Create succeeds because the properties are optional at creation time, but update enforces a valid, non-Unknown state.

    Workaround:

    • When PATCHing a building, always include a valid wifiState value.
    • When PATCHing a desk, always include a valid heightAdjustableState value.

    This is consistent with the pattern shown in the update examples where the PATCH body always includes a valid type and properties, for example:

    PATCH https://graph.microsoft.com/v1.0/places/530f7900-8063-4daf-9cc1-168cb3ac26e9
    Content-Type: application/json
    
    {
      "@odata.type": "microsoft.graph.desk",
      "mode": {
        "@odata.type": "microsoft.graph.dropInPlaceMode"
      }
    }
    
    1. Room/workspace placeId cannot be updated

    Recent changes to the Places model specify that:

    • The base place type no longer has placeId.
    • Only room and workspace retain a placeId property.

    The error Place id cannot be updated. occurs because placeId is a server-managed identifier and is immutable. Even if the request body does not explicitly change placeId, sending it in the PATCH payload can be interpreted as an attempt to update it.

    Workaround:

    • When PATCHing room or workspace, omit the placeId property entirely from the request body. Only send the properties that need to change.
    1. Building ServiceMetadata cannot be changed via API

    The error ServiceMetadata cannot be changed via API. indicates that some internal, service-managed metadata on the building resource is being treated as changed in the PATCH request. This aligns with the general rule that certain system properties are read-only and cannot be modified via Graph.

    The fact that:

    • PATCH works on the same day the building is created, but
    • fails 1+ days later

    suggests that the service populates or updates internal metadata after creation (for example, background processing or synchronization), and subsequent PATCH requests that include that metadata (even unchanged) are rejected.

    Workaround:

    • Use minimal PATCH payloads: send only the properties that must be updated, and omit any service-managed or read-only properties.
    • Ensure the request body matches the patterns in the official examples, which only include the type and the fields being changed, for example:
    PATCH /places/{id}
    Content-Type: application/json
    
    {
      "@odata.type": "microsoft.graph.building",
      "tags": ["most popular building"]
    }
    
    1. Permissions and roles

    Ensure the correct permissions and roles are configured, as Places updates require:

    • Place.ReadWrite.All (delegated or application) for /places/{id} PATCH.
    • For delegated (work/school), at least the Exchange Administrator Microsoft Entra role.
    • For application permissions, the TenantPlacesManagement and MailRecipient RBAC roles in Exchange Online.

    Although the documentation notes a known issue where updates may succeed without these roles but behave unexpectedly, configuring them correctly reduces the chance of inconsistent behavior.

    1. Where to report

    These behaviors—especially the Unknown state enforcement and the delayed ServiceMetadata error—are service-side issues. They should be reported through official Microsoft support or the Microsoft Q&A forums for Microsoft Graph/Places so that the product group can confirm whether they are bugs or by-design constraints.

    In the meantime, the practical guidance is:

    • Always include valid wifiState and heightAdjustableState values when updating buildings and desks.
    • Never include placeId in PATCH bodies for rooms and workspaces.
    • Use minimal PATCH payloads that only contain the properties being changed and the correct @odata.type.

    References:

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.