Restrict Multiple Sessions

Hi ,

We have limited user licences, User is using more sessions, other users are facing the problem, We want the option to restrict multiple sessions for users and this option availability only for admin user , Is there any option for this in dynamics AX

Thanks in Advance

Here’s what I did.

I added a table to hold the maximum number of sessions for each user. Users without an entry default to only a single session allowed.

I added the following code to Info.Startup (apologies for line break weirdness)

select count(recid) from sysClientSessions where sysClientSessions.userId == curuserid()
&& sysClientSessions.Status == 1 && sysClientSessions.clientType == 0;

if (sysClientSessions.RecId > UserSessionLimits::GetMaxSessions()) {

box::stop(strfmt(“You have exceeded your session limit of %1, the application will now close.”,UserSessionLimits::GetMaxSessions()));
appl.globalCache().set(classstr(info), identifierstr(Autologoff), true);

Hi Brian,
Could u please explain about this