Unable to Include Message Body in Microsoft Graph Subscription Resource URL

Offen
#1,630 1 Kommentar 3 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Bewertung

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

Rechercherichtung

Start with the Microsoft Graph subscription resource URL documentation and compare its supported query parameters with the posted payload, especially $select=body and $select=bodyPreview. Check the linked Stack Overflow discussion for context. Done means documenting a supported way to receive the full body or clearly confirming the API limitation and expected alternative.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

Description

I'm encountering an issue while attempting to create a subscription to receive change notifications, including resource data, in the Microsoft Graph API. Here's the payload I'm using:

{
    "changeType": "created",
    "notificationUrl": "<URL>",
    "resource": "me/mailFolders('Inbox')/messages?$select=body",
    "expirationDateTime": "2024-02-26T21:00:00.000Z",
    "latestSupportedTlsVersion": "v1_2",
    "includeResourceData": "true",
    "encryptionCertificate": "<SOME VALUE>",
    "encryptionCertificateId": "<SOME VALUE>"
}

However, upon sending a POST request with this payload, I'm encountering the following error message:

$top, $skip, $orderby, $select=body,uniqueBody and $expand other than singleValueExtendedProperties,multiValueExtendedProperties are not supported in subscription resource Url.

This error suggests that including $select=body in the resource URL is not permitted. If I exclude $select=body, I encounter a different error:

"select clause should be present in query string to support rich notifications"

This indicates that a select clause is required in the query string to support rich notifications.
Additionally, when I attempted to use $select=bodyPreview, I only received a truncated version of the body limited to 255 characters.

My objective is to receive change notifications including the entire body of the resource. I'm seeking guidance on how to achieve this.

I also created a post on StackOverFlow : https://stackoverflow.com/questions/78057126/select-body-not-working-while-creating-subscription-microsoft-graph-api

Vorherrschende Sprache
TypeScript
Sterne
833
Forks
240
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus microsoftgraph/msgraph-sdk-javascript

Alle Issues in microsoftgraph/msgraph-sdk-javascript

Ähnliche Issues

Weitere Issues zu TypeScript

Neue Issues direkt in Ihr Postfach

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