microsoftgraph / microsoftgraph/msgraph-sdk-dotnet
LegalHolds endpoint is not available in SDK
@lramosvea is already working on this.
Since Mar 23, 2026.
- Dominant language
- C#
- Stars
- 789
- Forks
- 264
- Avg merge
- 15h 17m
- Merged PRs (30d)
- 3
Description
Describe the bug
Documentation is here: https://learn.microsoft.com/en-us/graph/api/security-ediscoverycase-list-legalholds?view=graph-rest-1.0&tabs=csharp
This is a pretty straightforward issue. The SDK (likely all SDKs) do not recognize the endpoint.
When you try to use, you get a compile error:
'EdiscoveryCaseItemRequestBuilder' does not contain a definition for 'LegalHolds' and no accessible extension method 'LegalHolds' accepting a first argument of type 'EdiscoveryCaseItemRequestBuilder' could be found (are you missing a using directive or an assembly reference?)
var result = await graphClient.Security.Cases.EdiscoveryCases["{ediscoveryCase-id}"].LegalHolds.GetAsync();
I have a feeling this is broken for all SDKs because when you use the GraphExplorer, the endpoint doesn't autocomplete. On the bright side, the endpoint is alive and active because you can type the full name and it will work.
Expected behavior
The SDK to include released endpoints and supporting objects.
How to reproduce
- Create a new dotnet console app
- dotnet add Microsoft.Graph
- var result = await graphClient.Security.Cases.EdiscoveryCases["<caseId"].LegalHolds.GetAsync();
RESULTS:
'EdiscoveryCaseItemRequestBuilder' does not contain a definition for 'LegalHolds' and no accessible extension method 'LegalHolds' accepting a first argument of type 'EdiscoveryCaseItemRequestBuilder' could be found (are you missing a using directive or an assembly reference?)
SDK Version
5.100.0
Latest version known to work for scenario above?
None
Known Workarounds
Use the beta endpoint :(.
Debug output
Click to expand log
```</details>
### Configuration
- OS: Windows 11
- Architecture: Arm64
### 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.
Assessment
This issue has not been assessed yet.