microsoftgraph / microsoftgraph/msgraph-beta-sdk-java

Cannot update sponsors of user

オープン
#1,002 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

Needs: attention :wave: Needs: Attention 👋 Type: Question
主要言語
Java
スター
32
フォーク
14
平均マージ
1日 3時間
マージ済み PR(30日)
6

説明

Describe the bug

Im updating a user with new sponsors but in the update user throw an internal issue.

Expected behavior

Update the user with the sponsors provided

How to reproduce

Get a User class for existing user with sponsors, modify the sponsors list adding a new sponsors, set and update user.

SDK Version

6.13.0

Latest version known to work for scenario above?

No response

Known Workarounds

No response

Debug output
Click to expand log ```

Exception in thread "main" com.microsoft.graph.beta.models.odataerrors.ODataError: The context URL 'https://graph.microsoft.com/beta/$metadata#users(sponsors())/$entity' is invalid.
at com.microsoft.graph.beta.models.odataerrors.ODataError.createFromDiscriminatorValue(ODataError.java:36)
at com.microsoft.kiota.serialization.JsonParseNode.getObjectValue(JsonParseNode.java:212)
at com.microsoft.kiota.http.OkHttpRequestAdapter.lambda$throwIfFailedResponse$0(OkHttpRequestAdapter.java:674)
at com.microsoft.kiota.ApiExceptionBuilder.(ApiExceptionBuilder.java:26)
at com.microsoft.kiota.http.OkHttpRequestAdapter.throwIfFailedResponse(OkHttpRequestAdapter.java:673)
at com.microsoft.kiota.http.OkHttpRequestAdapter.send(OkHttpRequestAdapter.java:281)
at com.microsoft.graph.beta.users.item.UserItemRequestBuilder.patch(UserItemRequestBuilder.java:1138)
at com.microsoft.graph.beta.users.item.UserItemRequestBuilder.patch(UserItemRequestBuilder.java:1122)
at xxx.MSEntraService.updateUser(MSEntraService.java:86)
at xxx.Main.main(Main.java:147)

</details>


### Configuration

Windows 11 x64

### Other information

Any interaction with sponsors throw an error

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

まず Java SDK 6.13.0 で sponsor update を再現し、次に UserItemRequestBuilder.java と、stack trace で示されている MSEntraService.java および Main.java の呼び出し箇所を調査します。sponsor update に対する request の context URL と返された context URL を比較します。既存ユーザーの sponsors を変更でき、ODataError なしで update が完了すれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
java
領域
api
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。