Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Service | Customer Service, Contact Center, Fie...
Suggested answer

How to get users list who doesn't logged in from past 3months in d365 CRM

(2) ShareShare
ReportReport
Posted on by 4
How to get users list who doesn't logged in from past 3months in d365 customer service
  • Zap Objects Profile Picture
    919 on at
    How to get users list who doesn't logged in from past 3months in d365 CRM
    If you need an easy way to check which users have logged-in and which have not in past x months then can try Zap User Adoption Tracker App. 
    This can not only audit user-actions (like lead qualified, opportunity won/loss, cases closed, etc) but also track logins.
     
    Below shows screenshot of few of the reports which help filter out which users had logged-in and which have not:
     
     
    Here is the link for functionality page: https://zapobjects.com/apps/zap-audit-user-actions/
     
    Besides if you would like to have them automatically emailed to you then can try Zap Report Scheduler App.
  • Suggested answer
    Tom_Gioielli Profile Picture
    1,358 on at
    How to get users list who doesn't logged in from past 3months in d365 CRM
    As others have mentioned, enable auditing user access and then you will need to cross-reference it with a list of your users to see when the most recent login occurred.
     
  • Suggested answer
    Daivat Vartak (v-9davar) Profile Picture
    5,970 Super User 2025 Season 1 on at
    How to get users list who doesn't logged in from past 3months in d365 CRM
    Hello CU26030451-0,
     

    To get a list of users who haven't logged into Dynamics 365 Customer Service (or any Dynamics 365 environment) in the past three months, you'll need to use a combination of tools and techniques. Here's a breakdown of the process:

    1. Using the SystemUser Entity and Audit Logs (Recommended):

    • Understanding the Approach:

      • The SystemUser entity stores user information.
      • The audit logs track user login activity.
      • You'll need to query these logs to find users with recent login timestamps. 

    • Steps:

      1. Access the Audit Logs:

        • Go to Settings > Auditing > Audit Summary View.
        • You can filter the audit logs by "User Access Audit" events. 

      2. Use Advanced Find or FetchXML:

        • For more complex queries, use Advanced Find or FetchXML.
        • FetchXML Example (to get login activity):
        •  
        • <fetch distinct="true" mapping="logical" output-format="xml-platform" version="1.0">
            <entity name="audit">
              <attribute name="userid" />
              <attribute name="createdon" />
              <order attribute="createdon" descending="true" />
              <filter type="and">
                <condition attribute="action" operator="eq" value="65" /> <condition attribute="createdon" operator="on-or-after" value="[Date 3 months ago]" />
              </filter>
              <link-entity name="systemuser" from="systemuserid" to="userid" alias="user">
                <attribute name="fullname" />
                <attribute name="internalemailaddress"/>
              </link-entity>
            </entity>
          </fetch>

        • Replace [Date 3 months ago] with the actual date.
        • This query will give you all the users that have logged in within the last 3 months. 

      3. Find Users Not in the Login List:

        • Export the list of users from the SystemUser entity.
        • Either export the results of the fetch xml query, or use the web api to get the results.
        • Compare the two lists to identify users who are in the SystemUser list but not in the login activity list.
        • You can do this in Excel or using a scripting language. 

      4. Web API (Programmatic Approach):

        • If you need to automate this process, use the Dynamics 365 Web API.
        • You can use the web api to query both the audit and systemuser entities, and then use code to compare the results.

        •  
         

    2. Power Automate (For Automation):

    • You can create a Power Automate flow to automate the process:

      1. Get Recent Logins: Use the "List rows" action with the Audit entity, filtering for "User Access Audit" events within the last 3 months.
      2. Get All Users: Use the "List rows" action with the SystemUser entity.
      3. Compare Lists: Use "Compose" actions and expressions to compare the lists of users.
      4. Send Notification: Use the "Send an email (V2)" action to notify administrators of the users who haven't logged in.

      5.  

    Important Considerations:

    • Auditing Enabled: Ensure that auditing is enabled for user access events.
    • Audit Log Retention: Be aware of your audit log retention policies. Older logs might be purged.
    • Permissions: You'll need appropriate permissions to access audit logs and user data.
    • Time Zones: Consider time zone differences when filtering by date.
    • Deactivated Users: Ensure you filter out deactivated users from the SystemUser list.
    • Performance: Large audit logs can impact query performance.

    •  

    Key Recommendation:

    • Using FetchXML or the Web API to query the Audit and SystemUser entities is the most robust and accurate approach.
    • Power automate is great for automation of the process.

    •  

    By following these steps, you should be able to get a list of users who haven't logged into Dynamics 365 Customer Service in the past three months.

     
    If my answer was helpful, please click Like, and if it solved your problem, please mark it as verified to help other community members find more. If you have further questions, please feel free to contact me.
     
    My response was crafted with AI assistance and tailored to provide detailed and actionable guidance for your Microsoft Dynamics 365 query.
     
    Regards,
    Daivat Vartak
  • Suggested answer
    PerezAguiar Profile Picture
    on at
    How to get users list who doesn't logged in from past 3months in d365 CRM
    Hey.
    I don't think there's an easy answer for this. If your environment is Production, there's a 28 days storage of logs. But if its a Sandbox, there's only 7 days of logs

    Perhaps if you enable Auditing on the environment, includign read operations, you might check if a particular user has any access over the last 30-60-90 days. But of course, this will increase your storage consumption on auditing
     
    Regards,

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Jonas ”Jones” Melgaard – Community Spotlight

We are honored to recognize Jonas "Jones" Melgaard as our April 2025…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 294,095 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 232,866 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,158 Moderator

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans