Unable to Include Message Body in Microsoft Graph Subscription Resource URL
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 25/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- typescript
- Domain
- api
Research direction
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.
Written by the indexing model from the issue text.
Description
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
- Dominant language
- TypeScript
- Stars
- 833
- Forks
- 240
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from microsoftgraph/msgraph-sdk-javascript
-
status:waiting-for-triage
Difficulty 1/5 Under an hour Newbie friendliness 62/100
-
Is anyone here? Open
Difficulty 4/5 3-5 days Newbie friendliness 25/100
microsoftgraph/msgraph-sdk-javascript#2005 · 1 reaction ·
-
Is it really correct that the Javascript version of the graph SDK doesn't offer typed requests? Openstatus:waiting-for-triage
Difficulty 5/5 Over a week Newbie friendliness 42/100
-
status:waiting-for-triage type:bug
Difficulty 3/5 1-2 days Newbie friendliness 48/100
microsoftgraph/msgraph-sdk-javascript#1999 · 2 comments · 1 reaction ·
-
status:waiting-for-triage type:bug
Difficulty 4/5 3-5 days Newbie friendliness 45/100
All issues in microsoftgraph/msgraph-sdk-javascript
Similar issues
-
Type/Bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
OpenNSW/nsw-srilanka#497 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
0xMiden/bridge-portal#132 ·
-
react-doctor severity:warning tech-debt
Difficulty 1/5 Under an hour Newbie friendliness 88/100
digidem/comapeo-cloud-app#403 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100