Skip to main content

Notifications

Announcements

No record found.

Service | Customer Service, Contact Center, Fie...
Answered

User Access Audit Report Broken

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.

  • Verified answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: User Access Audit Report Broken

    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.

  • Alex Spodkiewicz Profile Picture
    Alex Spodkiewicz 45 on at
    RE: User Access Audit Report Broken

    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

  • Suggested answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: User Access Audit Report Broken

    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

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans