microsoftgraph / microsoftgraph/msgraph-metadata
PATCH Building results in "ODataError: ServiceMetadata cannot be changed via API"
Nobody has claimed this yet.
- 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:
- Create a Building object and set a display name, address and wifi state. Wifi state I used is 'disabled'.
- graphClient.places().post(building)
- Wait 1 day after creating
- 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.
- graphClient.places.byPlaceId(id).post(building)
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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