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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Answered

How to detect that a user session is terminated?

(0) ShareShare
ReportReport
Posted on by 10

Back in NAV, codeunit 1, we could subscribe to the event that tells that the user session is about to be closed, and put code in the subscriber to do some housekeeping, e.g. if your app uses records where the PK is SessionID you could delete them from a given app-related control table.

Now that in Dynamics 365 BC we don't have codeunit 1 anymore, what resource (e.g. codeunit event) could we subscribe to do a similar work?

Many thanks!

I have the same question (0)
  • Verified answer
    I Gusti Made Ari Profile Picture
    3,608 on at

    Check the  codeunit 40 LogInManagement , subscribe to event OnAfterLogInEnd

  • J. Leite Profile Picture
    10 on at

    Great, many thanks!

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 1,986 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 1,071 Super User 2026 Season 1

#3
Dhiren Nagar Profile Picture

Dhiren Nagar 975 Super User 2026 Season 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans