microsoftgraph / microsoftgraph/msgraph-sdk-java
Exception "Dangling name: extfq0cslxr_adminschemakey" when updating schema extension values
まだ誰も着手していません。
- 主要言語
- Java
- スター
- 444
- フォーク
- 154
- 平均マージ
- 18時間 28分
- マージ済み PR(30日)
- 4
説明
Describe the bug
I referred to the Microsoft documentation(https://learn.microsoft.com/en-us/graph/extensibility-overview?tabs=java) on schema extensions and tried using the provided code to update schema extension values directly. However, I encountered an exception with the message "Dangling name: extfq0cslxr_adminschemakey".
I am seeking a way to improve performance and avoid the exception by using direct filters to retrieve and update schema extension values.
Expected behavior
The schema extension values should be updated without any exceptions.
How to reproduce
Steps to Reproduce:
- Use the Microsoft Graph dependency with version 6.x.
- Refer to the following document to update the schema extension value on a particular group.
-Use the provided Java code:
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
User user = new User();
HashMap<String, Object> additionalData = new HashMap<String, Object>();
extkmpdyld2GraphLearnCourses = new ();
extkmpdyld2GraphLearnCourses.setCourseType("Instructor-led");
extkmpdyld2GraphLearnCourses.setCourseId(null);
additionalData.put("extkmpdyld2_graphLearnCourses", extkmpdyld2GraphLearnCourses);
user.setAdditionalData(additionalData);
User result = graphClient.users().byUserId("{user-id}").patch(user);
Encounter the following exception message while updating the value: "Dangling name: extfq0cqexr_adminschema".
SDK Version
6.10.0
Latest version known to work for scenario above?
5.x
Known Workarounds
Below Code works :
GraphServiceClient graphClient = GraphClientBuilder.getGraphClient();
Map<String, UntypedNode> map = new HashMap<>();
Map<String, Object> additionalData = new HashMap<>();
UntypedString productId = new UntypedString(group.getProductId());
UntypedString productAdminGroupId = new UntypedString("xxx-xx");
UntypedString linkedOrgGroupId = new UntypedString("xxx-xx-xxx);
UntypedBoolean adminGroup = new UntypedBoolean(true);
map.put("productId", productId);
map.put("productAdminGroupId", productAdminGroupId);
map.put("linkedOrgGroupId", linkedOrgGroupId);
map.put("adminGroup", adminGroup);
UntypedObject untypedObject = new UntypedObject(map);
additionalData.put(DIConstants.GROUP_ADDITIONAL_ATTRIBUTES_SCHEMA_KEY, untypedObject);
updateGroup.setAdditionalData(additionalData);
graphClient.groups().byGroupId(groupId).patch(updateGroup);
Debug output
Click to expand log
```</details>
### Configuration
_No response_
### Other information
I'm currently using the workaround code,but the following code is impacting the performance of APIs.So i'm looking for the direct filters from graph SDK
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず、Microsoft のドキュメントにあるスキーマ拡張の更新を Microsoft Graph SDK 6.10.0 で再現し、報告されている 5.x の動作と比較します。直接更新で additionalData がどのようにシリアル化されるか、また “Dangling name” 例外がどこで発生するかを追跡し、その後、ドキュメントに記載された更新が UntypedNode の回避策なしで成功することを確認します。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- java
- 領域
- api
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- 説明が足りない
- 初心者へのやさしさ
- 35/100