microsoftgraph / microsoftgraph/msgraph-sdk-java

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

Ouverte
#2,348 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Personne n'a encore pris cette issue.

status:waiting-for-triage type:bug
Langage dominant
Java
Étoiles
444
Forks
154
Merge moyen
18 h 28 min
PR mergées (30 j)
4

Description

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

Guide de contribution

Ouvrir le guide de contribution

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Piste de recherche

Commencez par reproduire la mise à jour de l’extension de schéma de la documentation Microsoft avec Microsoft Graph SDK 6.10.0 et comparez-la au comportement fonctionnel signalé de la version 5.x. Suivez la manière dont additionalData est sérialisé pour la mise à jour directe et l’endroit où l’exception « Dangling name » est levée, puis vérifiez que la mise à jour documentée réussit sans la solution de contournement UntypedNode.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
java
Domaine
api
Type d'issue
Bug
Difficulté
4/5
Temps estimé
3-5 jours
Activité
À l'abandon
Clarté
À clarifier
Accessibilité débutants
35/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.