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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Service | Customer Service, Contact Center, Fie...
Answered

User Access Audit Report Broken

(0) ShareShare
ReportReport
Posted on by 45

We have a report we created a few years back based on a similar article to this one using FetchXML: https://www.concurrency.com/blog/march-2016/creating-an-audit-report-for-user-logins-in-dynami 

It appears something has changed and the report no longer works. Has anyone experienced a similar issue and found a way to update the report so it will work again? I know there have been changes recently with auditing and wondered if an update has caused the problem.

  • Suggested answer
    Community Member Profile Picture
    on at

    Hi Alex Spodkiewicz,

    I have tested the Fetch XML query in the link you provided on my side and it could work fine. Have you tested it?

    And could you share the Fetch XML query you used?

    pastedimage1649320386789v1.png

  • Alex Spodkiewicz Profile Picture
    45 on at

    The fetchxml looks like this:

    <fetch mapping="logical" aggregate="true" version="1.0′ >
    <entity name="audit" >
    <attribute name="createdon" alias="LastLoginDate" aggregate="max" />
    <filter>
    <condition attribute="operation" operator="eq" value="4′ />
    </filter>
    <link-entity name="systemuser" from="systemuserid" to="objectid" alias="su" link-type="inner" >
    <attribute name="fullname" alias="fn" groupby="true" />
    <attribute name="domainname" alias="dn" groupby="true" />
    <attribute name="userlicensetype" alias="ult" groupby="true" />
    <attribute name="accessmode" alias="am" groupby="true" />
    <attribute name="isdisabled" alias="id" groupby="true" />
    </link-entity>
    </entity>
    </fetch>

    It was working up to about a month ago its to get the last login for each user.

    Thanks

    Alex

  • Verified answer
    Community Member Profile Picture
    on at

    Hi Alex Spodkiewicz,

    I tested this fetchxml and get the error:

    pastedimage1649743437795v1.png

    And I found a thread refer to this, this is because Audit has got migrated from SQL to Cosmos DB and haven't found any alternative.

    Pull last login date/time from audit entity (old fetchxml query no longer working) - Dynamics 365 General Forum Community Forum

    You could raise a ticket to contact Microsoft Support.

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 > Service | Customer Service, Contact Center, Field Service, Guides

#1
Syed Aqib Raza Profile Picture

Syed Aqib Raza 42

#2
11manish Profile Picture

11manish 31 Super User 2026 Season 2

#3
Travis South Profile Picture

Travis South 25

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans