How to pass Email id in Create legalHold method

Casepoint Developer 66 Reputation points
2021-06-04T04:03:50.367+00:00

Hi,

I am trying to use this method to create a legal hold.
API: POST /compliance/ediscovery/cases/{caseId}/legalHolds
document link: https://learn.microsoft.com/en-us/graph/api/ediscovery-case-post-legalholds?view=graph-rest-beta&tabs=http

As per the document,

Here is the request JSON

{  
  "@odata.type": "#microsoft.graph.ediscovery.legalHold",  
  "description": "String",  
  "createdBy": {  
    "@odata.type": "microsoft.graph.identitySet"  
  },  
  "isEnabled": "Boolean",  
  "status": "String",  
  "contentQuery": "String",  
  "errors": [  
    "String"  
  ],  
  "displayName": "String"  
}  

Here there is no example/option to pass "email-id/Usersource" in which we can create a hold.

Can you please tell me, how can I create a JSON for passing "email-ids/Usersources"?

Thank You!

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,651 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Jobmann, Eric 1 Reputation point
    2021-08-25T23:55:08.103+00:00

    The left-side menu in the documentation does NOT list all the endpoints available. You have to dig a bit deeper.
    To see all of the endpoints for a particular section, go to the first page listed for that category.
    Compliance (preview) -> eDiscovery -> Legal hold -> Legal hold
    Here you can see that there is more than List, Create, Get, Update, Delete
    https://learn.microsoft.com/en-us/graph/api/resources/ediscovery-legalhold?view=graph-rest-beta
    https://learn.microsoft.com/en-us/graph/api/ediscovery-legalhold-post-usersources?view=graph-rest-beta&tabs=http

    0 comments No comments