How can I create legal holds with the Beta Compliance API consistently without getting errors?

Logik Bot 0 Reputation points
2023-06-09T18:25:49.5633333+00:00

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:

  1. Create a case with a valid name
  2. Create a legal hold under the case with a display name, description, and sometimes with a start and end date and sometimes not)
  3. 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

  1. 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.
  2. 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?
  3. In general, what is the recommended flow to create a hold to preserve a user's mailbox in a case?
  4. 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?
Microsoft Security | Microsoft Graph
0 comments No comments
{count} votes

3 answers

Sort by: Most helpful
  1. TH-4749-MSFT 3,315 Reputation points
    2023-06-14T15:29:59.7066667+00:00

    Hello Logik Bot,

    Thanks for reaching out.

    APIs under the /beta version in Microsoft Graph are subject to change. Use of these APIs in production applications is not supported.

    I would suggest voicing your query and feedback on the Graph Feedback Forum.

    If the reply is helpful, please click Accept Answer and kindly upvote it. If you have additional questions about this answer, please click Comment.

    Thanks.

    0 comments No comments

  2. TH-4749-MSFT 3,315 Reputation points
    2023-06-15T14:43:52.31+00:00

    Hello Logik Bot,

    Good Day. Hope all is well.

    If the reply is helpful, please click Accept Answer and kindly upvote it. If you have additional questions about this answer, please click Comment.

    Thanks.

    0 comments No comments

  3. TH-4749-MSFT 3,315 Reputation points
    2023-06-19T14:38:46.36+00:00

    Hello Logik Bot,

    Good Day. Hope all is well.

    If the reply is helpful, please click Accept Answer and kindly upvote it. If you have additional questions about this answer, please click Comment.

    Thanks.

    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.