web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Answered

Exporting audit logs from LCS

(2) ShareShare
ReportReport
Posted on by 38
I am wondering if its possible to export LCS audit logs programatically, this mainly concerns logs of user access, logins requests onto the dynamics 365 enviroment. From within LCS, I can see the user activity section on the GUI, there must be a way to access the data and import into Azure.
I have the same question (0)
  • Suggested answer
    Shaluma Profile Picture
    375 Super User 2026 Season 2 on at
  • Verified answer
    Shaluma Profile Picture
    375 Super User 2026 Season 2 on at
    Hi @CU12092249-0

    There's no LCS API endpoint for this data, the correct production-grade solution is to bypass LCS entirely and pull the same login telemetry from its actual source: Microsoft Entra ID Sign-In Logs, combined with D365 FO's own UserSessionLog entity via OData.
    https://learn.microsoft.com/en-us/purview/audit-search

    Azure Portal → Microsoft Entra ID → Monitoring → Diagnostic Settings → Add diagnostic setting, Check SignInLogs Send to ,Log Analytics Workspace and/or Storage Account or Event Hub

    Automate export to Azure Storage with Azure Monitor Workbook or Data Export rule In Log Analytics → Tables → Export
     

    OData Entity UserSessionLogV2

    D365 FO exposes user session data directly via its OData endpoint. This is the same data underlying the LCS "User Activity" section.

    https://<your-d365-environment>.operations.dynamics.com/data/UserSessionLogV2
    Authentication (Azure AD App Registration), Pull the audit data, Export to Azure Blob Storage.
    
    Azure Logic App / Power Automate ,

    If you want a scheduled pull without maintaining PowerShell infrastructure, Recurrence (every 24h or weekly before the 7-day LCS window closes), Get Entra ID token (client credentials flow) , https://<env>.operations.dynamics.com/data/UserSessionLogV2?$filter=..., Parse JSON, Create CSV/JSON → Azure Blob Storage or Azure SQL


    Thanks,
    Shaluma

  • Suggested answer
    Anton Venter Profile Picture
    21,173 Super User 2026 Season 2 on at
     
    I think this is what you are looking for. I did not check exactly what information was available but the user activity should be included.
     
    Monitoring and telemetry overview
     
    Get started with telemetry for finance and operations apps
     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 341 Most Valuable Professional

#2
CU10121822-0 Profile Picture

CU10121822-0 312

#3
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 262 Super User 2026 Season 2

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans