microsoftgraph / microsoftgraph/msgraph-sdk-java

com.microsoft.graph.models.odataerrors.ODataError exception when trying to create Subscription

Offen
#2,421 1 Kommentar 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

In our java springboot app we use the following dependency: https://mvnrepository.com/artifact/com.microsoft.graph/microsoft-graph/5.72.0 (also checked on https://mvnrepository.com/artifact/com.microsoft.graph/microsoft-graph/6.42.1)

When we try to create eventhub subscription for meeting room via that API we are getting error:

com.microsoft.graph.http.GraphServiceException: Error code: ExtensionError\nError message: Operation: Create; Exception: [Status Code: BadRequest; Reason: The value 'https://outlook.office365.com/api/v2.0/Users('Room_Sandbox%40company.com')/Events'of parameter 'Resource' is invalid.]\n\nPOST[https://graph.microsoft.com/v1.0/subscriptions\nSdkVersion] : graph-java/v5.72.0\nSdkVersion : graph-java/v5.72.0\n[...]\n\n400 : \n[...]\n\n[Some information was truncated for brevity, enable debug logging for more details]

Room_Sandbox%40company.com - I changed this here intentionally, in the original response there is a different email.

But the error is only for particular emails, not for all. Other emails work fine.

We've tried to update to the newest dependencies related to this api but till getting the same error.

Stack trace:

com.microsoft.graph.models.odataerrors.ODataError: Operation: Create; Exception: [Status Code: BadRequest; Reason: The value 'https://outlook.office365.com/api/v2.0/Users('Room_Sandbox%40company.com')/Events' of parameter 'Resource' is invalid.] at com.microsoft.graph.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:704) at com.microsoft.kiota.ApiExceptionBuilder.<init>(ApiExceptionBuilder.java:26) at com.microsoft.kiota.http.OkHttpRequestAdapter.throwIfFailedResponse(OkHttpRequestAdapter.java:703) at com.microsoft.kiota.http.OkHttpRequestAdapter.send(OkHttpRequestAdapter.java:307) at com.microsoft.graph.subscriptions.SubscriptionsRequestBuilder.post(SubscriptionsRequestBuilder.java:100) at com.microsoft.graph.subscriptions.SubscriptionsRequestBuilder.post(SubscriptionsRequestBuilder.java:84)

Expected behavior

The subscription should be created without errors.

How to reproduce

Try to create subscription for meeting room

SDK Version

6.42.1

Latest version known to work for scenario above?

No response

Known Workarounds

No response

Debug output
Click to expand log ```
</details>


### Configuration

_No response_

### Other information

_No response_

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

Beginne damit, die Erstellung eines Abonnements für einen Besprechungsraum mit SDK 6.42.1 zu reproduzieren, und vergleiche eine betroffene E-Mail mit einer, die funktioniert. Untersuche SubscriptionsRequestBuilder.post und die gemeldete GraphServiceException/ODataError-Antwort; erledigt ist die Aufgabe, wenn das Abonnement für den betroffenen Raum ohne den ungültigen Resource-Fehler erstellt wird.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

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

Neue Issues direkt in Ihr Postfach

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