microsoftgraph / microsoftgraph/msgraph-sdk-java
Exception "Dangling name: extfq0cslxr_adminschemakey" when updating schema extension values
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- Java
- Star
- 444
- Fork
- 154
- Merge trung bình
- 18 giờ 28 phút
- Pull request đã merge (30 ngày)
- 4
Mô tả
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
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Bắt đầu bằng cách tái hiện bản cập nhật phần mở rộng schema trong tài liệu Microsoft bằng Microsoft Graph SDK 6.10.0 và so sánh với hành vi 5.x được báo cáo là hoạt động. Theo dõi cách additionalData được tuần tự hóa cho bản cập nhật trực tiếp và nơi ngoại lệ “Dangling name” được phát sinh, sau đó xác minh rằng bản cập nhật được tài liệu hóa thành công mà không cần workaround UntypedNode.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- java
- Lĩnh vực
- api
- Loại issue
- Lỗi
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Cần làm rõ
- Mức phù hợp với người mới
- 35/100