Title: byDriveItemId.patch() returns 204 No Content and fails on OneDrive Personal Accounts · Issue #2546 · microsoftgraph/msgraph-sdk-java · GitHub
Open Graph Title: byDriveItemId.patch() returns 204 No Content and fails on OneDrive Personal Accounts · Issue #2546 · microsoftgraph/msgraph-sdk-java
X Title: byDriveItemId.patch() returns 204 No Content and fails on OneDrive Personal Accounts · Issue #2546 · microsoftgraph/msgraph-sdk-java
Description: Describe the bug Using the graph sdk client I can't update (rename, move, or change any metadata) when I'm specifiying an itemId, instead of the path to the actual file. Expected behavior Works the same as on OneDrive Business. How to re...
Open Graph Description: Describe the bug Using the graph sdk client I can't update (rename, move, or change any metadata) when I'm specifiying an itemId, instead of the path to the actual file. Expected behavior Works the...
X Description: Describe the bug Using the graph sdk client I can't update (rename, move, or change any metadata) when I'm specifiying an itemId, instead of the path to the actual file. Expected behavior W...
Opengraph URL: https://github.com/microsoftgraph/msgraph-sdk-java/issues/2546
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"byDriveItemId.patch() returns 204 No Content and fails on OneDrive Personal Accounts","articleBody":"### Describe the bug\n\nUsing the graph sdk client I can't update (rename, move, or change any metadata) when I'm specifiying an itemId, instead of the path to the actual file.\n\n### Expected behavior\n\nWorks the same as on OneDrive Business.\n\n### How to reproduce\n\n```\npackage com.microsoft;\n\nimport com.azure.core.credential.AccessToken;\nimport com.azure.core.credential.TokenCredential;\nimport com.azure.core.credential.TokenRequestContext;\nimport com.microsoft.graph.models.DriveItem;\nimport com.microsoft.graph.serviceclient.GraphServiceClient;\nimport java.time.OffsetDateTime;\nimport reactor.core.publisher.Mono;\n\npublic class App {\n public static void main(String[] args) {\n final GraphServiceClient graphClient = new GraphServiceClient(\n new TokenCredential() {\n @Override\n public Mono\u003cAccessToken> getToken(TokenRequestContext request) {\n return Mono.just(new AccessToken(\n \"***\",\n OffsetDateTime.now().plusDays(1)));\n }\n });\n final DriveItem newMetadata = new DriveItem();\n newMetadata.setName(\"000\");\n final DriveItem result = graphClient\n .drives().byDriveId(\"097…\")\n .items().byDriveItemId(\"97…!s0c…\")\n .patch(newMetadata);\n if (result instanceof DriveItem) {\n System.out.println(result.getName());\n } else {\n System.out.println(\"Patch returned null\");\n }\n }\n}\n```\n\n### SDK Version\n\n_No response_\n\n### Latest version known to work for scenario above?\n\nMicrosoft Graph REST API before 2025-11-12.\n\n### Known Workarounds\n\nUsing `drives/{driveId}/root:/path/to/file` to patch, but according to the [documentation page](https://learn.microsoft.com/en-us/graph/api/driveitem-update?view=graph-rest-1.0&tabs=http#http-request) using Item IDs is preferred, also this option isn't exposed in the Java Sdk.\n\n### Debug output\n\n\u003cdetails>\u003csummary>Click to expand log\u003c/summary>\n\n```\n> PATCH /v1.0/drives/097…/items/97…!s8… HTTP/1.1\n> Accept: application/json\n> Content-Type: application/json\n> Transfer-Encoding: chunked\n> Host: graph.microsoft.com\n> Connection: Keep-Alive\n> Accept-Encoding: gzip,deflate\n> Authorization: ********\n> Prefer: Include-Feature=AddToOneDrive\n\u003c HTTP/1.1 204 No Content\n\u003c Cache-Control: max-age=0, private\n\u003c Strict-Transport-Security: max-age=31536000\n\u003c request-id: d90b78b1-b92c-4038-8c44-f1dd39f9c8cd\n\u003c client-request-id: d90b78b1-b92c-4038-8c44-f1dd39f9c8cd\n\u003c x-ms-ags-diagnostic: {\"ServerInfo\":{\"DataCenter\":\"Germany West Central\",\"Slice\":\"E\",\"Ring\":\"4\",\"ScaleUnit\":\"007\",\"RoleInstance\":\"FR2PEPF00000F84\"}}\n\u003c SPLogId: 65a8f6a1-e0bf-f000-6d60-d5c4d2d3abfd\n\u003c Date: Fri, 13 Feb 2026 18:53:07 GMT\n```\n\n\u003c/details>\n\n\n### Configuration\n\n_No response_\n\n### Other information\n\nThis started failing around 2025-11-12.\n\nAlso: rclone/rclone#9150\nhttps://github.com/iterate-ch/cyberduck/pull/17882\nhttps://github.com/iterate-ch/onedrive-java-client/pull/53","author":{"url":"https://github.com/AliveDevil","@type":"Person","name":"AliveDevil"},"datePublished":"2026-02-16T12:33:50Z","url":"https://github.com/microsoftgraph/msgraph-sdk-java/issues/2546"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:d3e14ff5-68f4-d8cc-a59a-43971ce87036 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | EB74:5D52E:996AB:D3A11:6AF6BAAF |
| html-safe-nonce | 1e38e3b455038b78b0c242679505423cb90cc9353a435e78f1e9bf4c108f4e23 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFQjc0OjVENTJFOjk5NkFCOkQzQTExOjZBRjZCQUFGIiwidmlzaXRvcl9pZCI6IjU3MjI5MjczNzQ0NTMxMzIwMCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 576cfb92a8ac0c2fe4a28e65531a79b116c73eea13e1f85bde4ad72ca28d62c3 |
| hovercard-subject-tag | issue:3947555244 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/microsoftgraph/msgraph-sdk-java/2546/issue_layout |
| twitter:image | https://opengraph.githubassets.com/58ea7d82a850f78572e9beb455b5db18d97c0d28e77e883fce9f8b04bb081c24/microsoftgraph/msgraph-sdk-java/issues/2546 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/58ea7d82a850f78572e9beb455b5db18d97c0d28e77e883fce9f8b04bb081c24/microsoftgraph/msgraph-sdk-java/issues/2546 |
| og:image:alt | Describe the bug Using the graph sdk client I can't update (rename, move, or change any metadata) when I'm specifiying an itemId, instead of the path to the actual file. Expected behavior Works the... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | AliveDevil |
| hostname | github.com |
| expected-hostname | github.com |
| None | 8dfae1499400ee498ab0f86538d1c034e6c1b4f51c63ecade775c3b0894e3379 |
| turbo-cache-control | no-preview |
| go-import | github.com/microsoftgraph/msgraph-sdk-java git https://github.com/microsoftgraph/msgraph-sdk-java.git |
| octolytics-dimension-user_id | 17304259 |
| octolytics-dimension-user_login | microsoftgraph |
| octolytics-dimension-repository_id | 103300409 |
| octolytics-dimension-repository_nwo | microsoftgraph/msgraph-sdk-java |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 103300409 |
| octolytics-dimension-repository_network_root_nwo | microsoftgraph/msgraph-sdk-java |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | ee168845eb2be91203b179104ac9977fe4ea69a3 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width