Hello!
I've been working with the Beta Compliance API and have had some mixed success getting the results I desire.
My Process
I am trying to create holds for a user's mailbox by orchestrating the following in the API:
- Create a case with a valid name
- Create a legal hold under the case with a display name, description, and sometimes with a start and end date and sometimes not)
- Create a user source under the legal hold with an email and display name
My Results
Most of the time, the process between #1 and #2 fails and I have to try again. It appears that #1 takes some time (more than 30 seconds in some cases) to create before I can even attempt to create the legal hold.
If I get past that case, then I create the hold, but sometimes the state of the hold is "On (Error)" and I have to retry with sending a PUT to the legal hold without changing of the data and then will change the error to "On (Success)".
If I don't try to update the legal hold, it will remain in an "On (Error)" status indefinitely.
Other Problems
Other problems I consistently face are:
504 Timeouts
503 Service Unavailable
500 Unknown Error
Policy deployment has been interrupted by an unexpected Office 365 datacenter issue. Please contact Microsoft support to fix the deployment issue.
In most of these cases, I haven't changed my code flow or the timing of my requests.
My Questions
- How can I consistently get a successful response on legal hold creation? Do I have to poll the case for some sort of status information BEFORE I attempt to create a legal hold? It usually says "active" right after creating it.
- Should I not try creating holds in this way? Should I be using non-custodial data sources? Is it better to create a data source with a custodian? Does that automatically create a legal hold like it does through the UI?
- In general, what is the recommended flow to create a hold to preserve a user's mailbox in a case?
- I know this is beta, so what's the best way to give feedback for the issues I'm having? Is there a place where I can submit bugs?