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

Community site session details

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

Users who have never logged in

(0) ShareShare
ReportReport
Posted on by 30

Hi All, 

I am hoping someone can help me. 

My organization currently uses 'User Audit Viewer' in XRM Tool Box to find all users who haven't logged in for 3 months. However, this report doesn't show you users who have never logged in.  

Does anyone know of any FETCHXML that can help me achieve this? I've tried to build from the user entity and link to audit entity, but I've failed to generate what I need. 

Any help would be greatly appreciated. 

I have the same question (0)
  • nisar542 Profile Picture
    30 on at
    RE: Users who have never logged in

    Hi Daniel - thank you for taking out the time to help respond to my query.

    What you have suggested is a great idea... it's actually a very simple idea and easily implementable when I think about it.

    I'm going to give it a shot.  

  • nisar542 Profile Picture
    30 on at
    RE: Users who have never logged in

    Hi Leco - thank you for responding to my query.

    We are cloud based so it's a bummer I can't use that SQL query... however I've read the blog you linked and it's given me an idea on an approach I can attempt.

    Appreciate you taking out the time to respond.  

  • Suggested answer
    PerezAguiar Profile Picture
    Microsoft Employee on at
    RE: Users who have never logged in

    hey Nisar.

    I'm not sure if its still valid, as Auditing was being moved out of DB into a separate container (Log capacity).  But I can think of

    a) querying using the User Audit Viewer to retrieve users that haven't logged on the last 3 months.

    b) check for those that have logged in the last 3 months

    c) get all users from the environment, and compare to the previous 2 lists. If the user is not on one of those two lists, probably it hasn't ever logged in.

    Another possibility for you is to check ledgeviewpartners.com/.../.  Basically, enable the auditing to go to compliance center. If the user has logged in the last 6 months (or 1 year) and then, users who haven't logged in that time.

    Regards

  • Suggested answer
    Leco Lv Profile Picture
    on at
    RE: Users who have never logged in

    Hi partner,

    The 'User Audit Viewer' allows you to query each user's login history, as well as export a report to Excel for users who have not logged in for a certain period. The only thing not included in the report are users who have never logged in, so you must manually look at each user's login history to see if it's empty. I don't know if you are using the online or on-premises version? if you are using the on-premises version of Microsoft Dynamics 365, you can query the Audit.

    SELECT su.fullname,

    su.domainname,

    su.userlicensetype,

    su.accessmode

    FROM systemuser AS su

    WHERE su.systemuserid IN (SELECT systemuserid

    FROM systemuser

    EXCEPT

    SELECT DISTINCT objectid

    FROM audit

    WHERE operation = 4);

    Please refer to the link:

    https://nishantrana.me/2020/05/22/get-users-last-logon-time-in-dynamics-365/

       

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…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

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

#1
MVP-Daniyal Khaleel Profile Picture

MVP-Daniyal Khaleel 76

#2
Tom_Gioielli Profile Picture

Tom_Gioielli 28 Super User 2025 Season 2

#3
Gerardo Rentería García Profile Picture

Gerardo Rentería Ga... 17 Most Valuable Professional

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans