Case creation and Case listing gives "An unexpected error occurred."

Shubham Jethava 0 Reputation points
2025-04-14T10:44:55.6266667+00:00
Microsoft.Graph.Beta.Models.ODataErrors.ODataError
  HResult=0x80131500
  Message=An unexpected error occurred.
  Source=Microsoft.Kiota.Http.HttpClientLibrary
  StackTrace:
   at Microsoft.Kiota.Http.HttpClientLibrary.HttpClientRequestAdapter.<ThrowIfFailedResponseAsync>d__28.MoveNext()
   at Microsoft.Kiota.Http.HttpClientLibrary.HttpClientRequestAdapter.<SendAsync>d__20`1.MoveNext()
   at Microsoft.Kiota.Http.HttpClientLibrary.HttpClientRequestAdapter.<SendAsync>d__20`1.MoveNext()
   at Microsoft.Graph.Beta.Security.Cases.EdiscoveryCases.EdiscoveryCasesRequestBuilder.<PostAsync>d__7.MoveNext()
   at EdiscoveryAPI.GraphAPI.src.Services.edcaseoperation.EdCaseOperation.<CreateCase>d__6.MoveNext() in D:\Git\Analytics_UtilityProjects\EdiscoveryAPI\EdiscoveryAPI\GraphAPI\src\services\edcaseoperation\EdCaseOperation.cs:line 115
  This exception was originally thrown at this call stack:

Microsoft.Kiota.Http.HttpClientLibrary.HttpClientRequestAdapter.ThrowIfFailedResponseAsync(System.Net.Http.HttpResponseMessage, System.Collections.Generic.Dictionary<string, Microsoft.Kiota.Abstractions.Serialization.ParsableFactory<Microsoft.Kiota.Abstractions.Serialization.IParsable>>, System.Diagnostics.Activity, System.Threading.CancellationToken)

Microsoft.Kiota.Http.HttpClientLibrary.HttpClientRequestAdapter.SendAsync<ModelType>(Microsoft.Kiota.Abstractions.RequestInformation, Microsoft.Kiota.Abstractions.Serialization.ParsableFactory<ModelType>, System.Collections.Generic.Dictionary<string, Microsoft.Kiota.Abstractions.Serialization.ParsableFactory<Microsoft.Kiota.Abstractions.Serialization.IParsable>>, System.Threading.CancellationToken)

Microsoft.Kiota.Http.HttpClientLibrary.HttpClientRequestAdapter.SendAsync<ModelType>(Microsoft.Kiota.Abstractions.RequestInformation, Microsoft.Kiota.Abstractions.Serialization.ParsableFactory<ModelType>, System.Collections.Generic.Dictionary<string, Microsoft.Kiota.Abstractions.Serialization.ParsableFactory<Microsoft.Kiota.Abstractions.Serialization.IParsable>>, System.Threading.CancellationToken)

Microsoft.Graph.Beta.Security.Cases.EdiscoveryCases.EdiscoveryCasesRequestBuilder.PostAsync(Microsoft.Graph.Beta.Models.Security.EdiscoveryCase, System.Action<Microsoft.Kiota.Abstractions.RequestConfiguration<Microsoft.Kiota.Abstractions.DefaultQueryParameters>>, System.Threading.CancellationToken)

EdiscoveryAPI.GraphAPI.src.Services.edcaseoperation.EdCaseOperation.CreateCase(EdiscoveryAPI.GraphAPI.src.GraphAPI.Entity.edcase.EdCase) in EdCaseOperation.cs  

Above exception is thrown by GraphAPI when calling function in the image.

User's image

Below permissions are given.User's image

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
13,504 questions
{count} votes

1 answer

Sort by: Most helpful
  1. SrideviM 2,290 Reputation points Microsoft External Staff
    2025-04-24T09:42:53.77+00:00

    Hello Shubham Jethava,

    I understand this issue can be frustrating. I’ve tested the same scenario using both delegated and app-only authentication, and I encountered the exact same behavior.

    HTTP requests made through Postman are resulting in timeouts, while SDK calls return an unknown error.

    Here is the timeout message from Postman:

    Timeout Error

    And the error returned by the SDK:

    Unknown Error

    Based on this and similar reports from other users, it appears to be a known issue with the Graph API for eDiscovery. You can find a related discussion here: Graph eDiscovery API or compliance (Beta) API broken

    As a workaround, Security & Compliance PowerShell is currently working well and can be used to manage eDiscovery cases. To begin, you can follow the official documentation here:

    Connect-IPPSSession - PowerShell | Microsoft Learn

    After connecting, you can create a case using the following command:

    Connect-IPPSSession
    
    New-ComplianceCase -Name "Sample Case" -CaseType AdvancedEdiscovery -Description "Created via PowerShell" -ExternalId "REF-12345"
    

    Response:

    Case Creation

    To list all available eDiscovery (Premium) cases, you can run this command:

    
    Get-ComplianceCase -CaseType AdvancedEdiscovery
    

    Response:

    Case List

    Hope this helps!


    If this answer was helpful, please click "Accept the answer" and mark Yes, as this can help other community members.

    User's image

    If you have any other questions or are still facing issues, feel free to post in the comments and I’ll be happy to assist further.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.