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 :
Microsoft Dynamics GP (Archived)

Force session timeout/ auto logoff after period

(0) ShareShare
ReportReport
Posted on by

Hi all, 

I am currently working on developing some code to log users off after a period of inactivity. I don't believe there are any tables that contain a recording of such a variable. Is there any way to grab this information? Or is it even possible?

Thank you

*This post is locked for comments

I have the same question (0)
  • Community Member Profile Picture
    on at
    RE: Force session timeout/ auto logoff after period

    Thanks guys, I am fully aware of the implications. We have maintenance windows and not all users are responding to emails to be logged out at the end of the day... My partner and I have encountered the issue before. We have a test environment that only we have access too, to fully test these. Again thank you so much for your time!

  • Verified answer
    Mahmoud Saadi Profile Picture
    32,738 on at
    RE: Force session timeout/ auto logoff after period

    While I do agree with Harry about the fact that such requirement could be quite controversial, I do agree as well that it would be a good way to automate this process. We have done this for one of our clients, the core of this requirement is to "kick" any user who has been idle for more than 4 hours.

    In order not to reinvent the wheel, consider an SQL script that I have provided in order to show Dynamics GP activity as linked with the SQL sessions, it already provided idle SQL sessions details, as shown below:

    User-Activity-Report_5B00_9_5D00_.png

    The script can be found on this link

    Remember one important thing, such customization would result with critical and disastrous results in case it was not properly developed, deployed and most importantly communicated with the end-users. Imagine that a specific user is posting a batch containing around 100+ transactions, and your code gets them kicked "by mistake" ! Therefore, if you don't have enough and sufficient knowledge to get this developed, tested and up and running, you do need to consult your partner regarding such requirement. 

    Your feedback is highly appreciated,

  • Verified answer
    Redbeard Profile Picture
    12,931 on at
    RE: Force session timeout/ auto logoff after period

    First a warning - removing a user from the system automatically will terminate their session, and could damage/destroy their current work, cause stuck batches, etc.

    Use at your own risk, and carefully, the Activity table in the Dynamics (system) database has the information you're looking for.

    Select USERID,LOGINDAT,LOGINTIM from Dynamics..ACTIVITY

  • Community Member Profile Picture
    on at
    RE: Force session timeout/ auto logoff after period

    Oops! We are on GP 2015, no 2010.

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…

Andrés Arias – Community Spotlight

We are honored to recognize Andrés Arias as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics GP (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans