Forum Discussion
Getting Microsoft Purview -> Solutions -> DSPM for AI -> Activity Explorer data into Fabric
Traditionally, we used to export the csv from Microsoft Purview -> Solutions -> DSPM for AI -> Activity Explorer which will give us the AI usage in our organisation. This process used to give us 10,000 records. Earlier, this manual process was working ok for us. However, as the AI usage is increased, we are thinking about a automated process where we can connect to Purview data directly into Fabric. Thanks
Hi max_mrc,
The best path is to use the Purview Compliance / M365 Compliance Audit APIs to pull Activity Explorer logs instead of downloading CSVs. These APIs can be called on a schedule, and the results can be landed straight into a Fabric Lakehouse or Dataflow Gen2.
https://learn.microsoft.com/graph/api/resources/security-api-overviewIf you found this helpful, consider giving some Kudos. If I answered your question or solved your problem, mark this post as the solution.
7 Replies
- tayloramySuper User
Hi max_mrc,
The best path is to use the Purview Compliance / M365 Compliance Audit APIs to pull Activity Explorer logs instead of downloading CSVs. These APIs can be called on a schedule, and the results can be landed straight into a Fabric Lakehouse or Dataflow Gen2.
https://learn.microsoft.com/graph/api/resources/security-api-overviewIf you found this helpful, consider giving some Kudos. If I answered your question or solved your problem, mark this post as the solution.
- v-hashadapuCommunity Support
Hi max_mrc , hope you are doing great. May we know if your issue is solved or if you are still experiencing difficulties. Please share the details as it will help the community, especially others with similar issues.
- v-hashadapuCommunity Support
Hi max_mrc , Hope you're doing okay! May we know if it worked for you, or are you still experiencing difficulties? Let us know — your feedback can really help others in the same situation.
- v-hashadapuCommunity Support
Hi max_mrc , Hope you're doing fine. Can you confirm if the problem is solved or still persists? Sharing your details will help others in the community.
- max_mrcFrequent Visitor
Can someone please give the Microsoft Graph API endpoint that will give me the AI usage data of my organisation. Thanks
- v-hashadapuCommunity Support
Hi max_mrc , Thank you for reaching out to the Microsoft Fabric Community Forum.
There isn’t a dedicated Microsoft Graph API just for AI usage. The data you see in Purview -> DSPM for AI -> Activity Explorer comes from the Microsoft Purview Audit (Premium) logs. To automate what you are doing manually today, you should query these logs through the Microsoft Graph Audit API. The endpoint you’ll use is POST https://graph.microsoft.com/v1.0/security/auditLog/search
You can filter it to only return AI-related activities. For example, setting Workload eq 'CopilotForMicrosoft365' in your query will capture the Copilot and AI usage events that Activity Explorer is surfacing. These are the same records behind your CSV exports.
Once you can pull the data, the next step is to automate ingestion into Microsoft Fabric. The most common way is with a Data Factory pipeline, using the REST API activity to call Graph on a schedule. You can then land the output directly into a Lakehouse for storage and reporting. Alternatively, the Microsoft 365 connector in Fabric Data Factory may also fit if you prefer a connector-based approach.
From there, you can transform and report on the data in Power BI or continue shaping it with Dataflows Gen2 or Notebooks. This way, you replace the manual CSV process with a scheduled, automated pipeline that keeps your AI usage dataset up to date.
Use the Microsoft Graph security API - Microsoft Graph v1.0 | Microsoft Learn
Audit log activities | Microsoft Learn
Learn about auditing solutions in Microsoft Purview | Microsoft Learn
Use the Microsoft Graph security API - Microsoft Graph v1.0 | Microsoft Learn
REST API capabilities for Fabric Data Factory - Microsoft Fabric | Microsoft Learn
Configure Microsoft 365 in a copy activity - Microsoft Fabric | Microsoft Learn
- max_mrcFrequent Visitor
No api endpoint gave me the desired results of same extract as csv. I even tried the Powershell script.
Export-ActivityExplorerData (ExchangePowerShell) | Microsoft Learn
Looks like it is in the Roadmap of Microsoft.
Microsoft 365 Roadmap | Microsoft 365
I will keep updated if Microsoft introduce the api. Thanks