microsoftgraph / microsoftgraph/msgraph-sdk-dotnet
DELETE message call return HTTP 403 instead of HTTP 404 when using immutable ids
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 789
- Forks
- 264
- Avg merge
- 15h 17m
- Merged PRs (30d)
- 3
Description
Describe the bug
Hello,
I'm using Microsoft.Graph C# nuget package version 5.97.0.
I'm getting emails from outlook, process them and delete at the end.
Sometimes during delete attempt, message already doesn't exists in the mailbox. In such a case I get HTTP 404 response. It's normal. But when I use immutable ids - I get HTTP 403 response instead of 404. I think it should be still 404...
Expected behavior
If we want to delete message that doesn't exists we should get HTTP 404 response nevertheless we use immutable ids or not
How to reproduce
- Get message using Prefer: "IdType="ImmutableId"" header
- Delete message using id retrieved in step 1.
- Try to delete the same message again
Expected: second delete call returns 404
Current: second delete call return 403 with content {"error":{"code":"ErrorCannotDeleteObject","message":"Object cannot be deleted."}}
SDK Version
5.97.0
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_
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.
Research direction
Start by reproducing the DELETE sequence against Microsoft.Graph C# NuGet package 5.97.0: retrieve a message with Prefer: "IdType="ImmutableId"", delete it, then repeat the delete. Compare the second response with deletion using a regular ID; done means the already-deleted immutable-ID message returns HTTP 404 rather than HTTP 403 ErrorCannotDeleteObject.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- api
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100