microsoftgraph / microsoftgraph/msgraph-sdk-java

Exception "Dangling name: extfq0cslxr_adminschemakey" when updating schema extension values

未關閉
#2,348 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

status:waiting-for-triage type:bug
主要語言
Java
星號
444
分支
154
平均合併
18 小時 28 分鐘
30 天內合併 PR
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

貢獻指南

開啟貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

研究方向

首先,使用 Microsoft Graph SDK 6.10.0 重現 Microsoft 文件中的結構描述擴充更新,並將其與回報中可正常運作的 5.x 行為進行比較。追蹤直接更新時 additionalData 的序列化方式,以及「Dangling name」例外在哪裡引發,然後確認文件所述的更新不使用 UntypedNode workaround 也能成功。

由索引模型根據 Issue 內容生成。

評估

技術堆疊
java
領域
api
Issue 類型
缺陷
難度
4/5
預估耗時
3-5 天
活躍度
停滯
描述清晰度
需要釐清
新手友好度
35/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。