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

Notifications

Announcements

No record found.

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.

I have the same question (0)
  • 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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Service | Customer Service, Contact Center, Field Service, Guides

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 55 Super User 2025 Season 2

#2
Daniyal Khaleel Profile Picture

Daniyal Khaleel 27 Most Valuable Professional

#3
Soundari Profile Picture

Soundari 15

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans