microsoftgraph / microsoftgraph/msgraph-metadata

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

Open
#1,073 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

ToTriage
Dominant language
XSLT
Stars
166
Forks
55
Avg merge
16h 12m
Merged PRs (30d)
14

Description

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)

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the issue with Graph API v1.0 and the Kiota-generated Java classes, comparing a same-day PATCH with one sent after a day. Use the listed places().post and places.byPlaceId(id).post entry points; done means the delayed PATCH no longer returns the ServiceMetadata error.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.