Is there any API to get Microsoft compliance reports?

Akash Tripathy 0 Reputation points
2024-04-30T10:24:18.7466667+00:00

I wish to retrieve the Microsoft Message encryption report and Alerts from the Microsoft Compliance program via API automation. The manual procedure I currently follow is as follows.

1.Message Encryption Report:

Screenshot 2024-04-16 at 10.03.47 AM

Link: https://compliance.microsoft.com/reports/encryptionreport

  • Select “Export” found below the graph
  • Follow prompts that appear on the right of the screen

Email of report will be send, click on link in email and report will be downloaded via browser.

  1. DPL Reports Screenshot 2024-04-16 at 10.05.05 AM

Link: https://compliance.microsoft.com/datalossprevention?viewid=dlpalerts

  • Click on “Alert Name”
  • Using the details shown on the right pane, count DLP instances for PII and PCI.
Microsoft 365 and Office | Install, redeem, activate | For business | Windows
Microsoft Security | Intune | Reporting
Microsoft Security | Microsoft Graph
Microsoft Security | Microsoft Purview
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Vasil Michev 119.8K Reputation points MVP Volunteer Moderator
    2024-04-30T15:32:14.91+00:00

    For the email encryption report, you can use the Get-MailDetailEncryptionReport cmdlet: https://learn.microsoft.com/en-us/powershell/module/exchange/get-maildetailencryptionreport?view=exchange-ps

    For the DLP Alerts, use Get-MailDetailDlpPolicyReport: https://learn.microsoft.com/en-us/powershell/module/exchange/get-maildetaildlppolicyreport?view=exchange-ps

    Do note those are specific to Exchange data only. To get all the DLP alerts across workloads, you can use the Graph API's /alerts_v2 endpoint instead: https://learn.microsoft.com/en-us/graph/api/security-list-alerts_v2?view=graph-rest-1.0&tabs=http

    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.