'Enable litigation hold

I would like to know if there is a way to enable/disable the LitigationHold attribute on an O365 mailbox with the Microsoft Graph API?

Currently the way I use is with PowerShell with below command

Set-Mailbox -LitigationHoldEnabled $true 


Solution 1:[1]

This isn't supported by Microsoft Graph. You can use Graph's UserVoice to add this suggestion.

As a general rule of thumb, Microsoft Graph surfaces APIs that mirror what a user would do while via a client application while PowerShell surfaces APIs that mirror what an Admin would do through the service's admin portal.

Solution 2:[2]

This has been provided in Graph API Beta POST /compliance/ediscovery/cases/{caseId}/legalHolds

https://docs.microsoft.com/en-us/graph/api/ediscovery-case-post-legalholds?view=graph-rest-beta&tabs=powershell

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Marc LaFleur
Solution 2 Jyothsna Radha