Skip to content

LegalHolds endpoint is not available in SDK #3052

@marshalhagen

Description

@marshalhagen

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

  1. Create a new dotnet console app
  2. dotnet add Microsoft.Graph
  3. 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_

Metadata

Metadata

Assignees

No one assigned

    Labels

    status:waiting-for-triageAn issue that is yet to be reviewed or assignedtype:bugA broken experience

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions