microsoftgraph / microsoftgraph/msgraph-sdk-java

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

Offen
#2,348 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

status:waiting-for-triage type:bug
Vorherrschende Sprache
Java
Sterne
444
Forks
154
Ø Merge
18 Std. 28 Min.
Gemergte PRs (30 T.)
4

Beschreibung

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

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

Beginnen Sie damit, die Aktualisierung der Schemaerweiterung aus der Microsoft-Dokumentation mit Microsoft Graph SDK 6.10.0 nachzustellen und sie mit dem gemeldeten funktionierenden Verhalten der 5.x-Version zu vergleichen. Verfolgen Sie, wie additionalData für die direkte Aktualisierung serialisiert wird und wo die Ausnahme „Dangling name“ ausgelöst wird, und überprüfen Sie anschließend, dass die dokumentierte Aktualisierung ohne den UntypedNode-Workaround erfolgreich ist.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
java
Bereich
api
Issue-Typ
Bug
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Veraltet
Klarheit
Muss geklärt werden
Anfängerfreundlichkeit
35/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.