Skip to content

PATCH Building results in "ODataError: ServiceMetadata cannot be changed via API" #1073

@iYuriZ

Description

@iYuriZ

Sending a PATCH request to patch a Building Place object results in "ODataError: ServiceMetadata cannot be changed via API". This only happens on Buildings created 1 or more days ago. Patching a Building on the same day it is created works fine.

I am using Graph API v1.0, metadata Java classes generated via Kiota. Using UsernamePasswordCredential authentication.

Reproduction:

  1. Create a Building object and set a display name, address and wifi state. Wifi state I used is 'disabled'.
  2. graphClient.places().post(building)
  3. Wait 1 day after creating
  4. Prepare a Building object to send a PATCH request. This can be done by reading the created one using the id, or creating a new Building object and only setting the id. Both cases will result in the same issue. Also no values require changing to reproduce the issue.
  5. graphClient.places.byPlaceId(id).post(building)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions