microsoftgraph / microsoftgraph/msgraph-sdk-java

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

Aperta
#2,348 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

status:waiting-for-triage type:bug
Lingua principale
Java
Stelle
444
Fork
154
Merge medio
18h 28m
PR unite (30g)
4

Descrizione

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

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Inizia riproducendo l'aggiornamento dell'estensione dello schema dalla documentazione Microsoft con Microsoft Graph SDK 6.10.0 e confrontalo con il comportamento funzionante segnalato della versione 5.x. Traccia come viene serializzato additionalData per l'aggiornamento diretto e dove viene generata l'eccezione “Dangling name”, quindi verifica che l'aggiornamento documentato abbia esito positivo senza la soluzione alternativa UntypedNode.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
java
Ambito
api
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Da chiarire
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.