back to top

Finding What Users are Logged In from within the Infor CRM (Saleslogix) Web Client

The Infor CRM licensing model and enforcement is a component of the SLX Server component and is handled at the Saleslogix OLE DB Proivder level. You have access to this information from within the Administrator application via the color coded icons next to the user list showing green for those users currently logged in. There isn’t really a well defined way of getting this information any other way.

Until now!

Digging around in the web assemblies, you can find severl methods that look promising. The Sage.SalesLogix.Security assembly has a couple of promising classes called the LicenseService and the UserManagementService. Both of these have several common methods that look to be the winners. GetLicenseCount, GetLicenseAvailableCount, GetLicenseUsedCount all seem to be exactly what we want. They each accept a parameter of the LicenseType you want to get details on. To use you can do something like:

    Sage.SalesLogix.Security.UserManagementService userv = new Sage.SalesLogix.Security.UserManagementService();
    int concurrentTotal = userv.GetLicenseCount(Sage.Entity.Interfaces.UserType.Concurrent); //it does work!!
    int x = userv.GetLicenseUsedCount(Sage.Entity.Interfaces.UserType.Concurrent); //doesnt work, returns 0
    int z = userv.GetLicenseAvailableCount(Sage.Entity.Interfaces.UserType.Concurrent); //doesnt work, provides total seat license for all types
    int y = userv.GetLoggedInUsers().Count; //Doesnt work, returns 0

As you can tell by the comments there are problems with these methods. problems meaning they don’t work. in either service class.

Sigh.

Fear not, there is one more place that looks promising, the SLXConcurrentLicenseProvider class. That one has a lot less in it and the code that is there is not very helpful but it did lead me down the rabbit hole I needed to follow. Using that code as a basis I discovered the helpful SLXSystemProvider class. Using this class is the ticket. From here we gain access through COM to the provider level licensing details that you see in the Administrator! Lets take a look at how we can use it.

You can invoke this class like so:

using (Sage.SalesLogix.SLXSystemProvider provider = new Sage.SalesLogix.SLXSystemProvider())

With that present, there are now 2 key methods: GetConcurrentAvailable and LoggedInUsers

GetConcurrentAvailable accepts 3 parameters, the SLX server, the SLX port, and the Server Connection Name. All of these can be accessed using the DataService, like so:

        var datasvc = Sage.Platform.Application.ApplicationContext.Current.Services.Get<Sage.Platform.Data.IDataService>() as Sage.Platform.Data.IDataService;
        int concurrentAvailabelCnt = provider.GetConcurrentAvailable(datasvc.Server, 1706, datasvc.Alias);

The LoggedInUsers method just takes one parameter, the SLX Server Alias:

        var datasvc = Sage.Platform.Application.ApplicationContext.Current.Services.Get<Sage.Platform.Data.IDataService>() as Sage.Platform.Data.IDataService;
        string loggedInIds = string.Join(",", provider.LoggedInUsers(datasvc.Alias));

The GetConcurrentAvailable returns how many available concurrent licenses are free to use. It returns an integer.
The LoggedInUsers method returns the UserID of each logged in user.

By using each UserID returned we can parse out who they are using the normal entity model. Note, the LoggedInUser shows each user login and across any platform so if a user is logged in 3 times (Windows client, Architect, Web Client) then you see there name 3 times. Lets look at a full code block that can show details of who is logged in and breaking that down by concurrent and not:

    Sage.SalesLogix.Security.UserManagementService userv = new Sage.SalesLogix.Security.UserManagementService();
    int concurrentTotal = userv.GetLicenseCount(Sage.Entity.Interfaces.UserType.Concurrent); //it does work!!
    int x = userv.GetLicenseUsedCount(Sage.Entity.Interfaces.UserType.Concurrent); //doesnt work, returns 0
    int z = userv.GetLicenseAvailableCount(Sage.Entity.Interfaces.UserType.Concurrent); //doesnt work, provides total seat license for all types
    int y = userv.GetLoggedInUsers().Count; //Doesnt work, returns 0
    
    using (Sage.SalesLogix.SLXSystemProvider provider = new Sage.SalesLogix.SLXSystemProvider())
    {
        var datasvc = Sage.Platform.Application.ApplicationContext.Current.Services.Get<Sage.Platform.Data.IDataService>() as Sage.Platform.Data.IDataService;

        int concurrentAvailabelCnt = provider.GetConcurrentAvailable(datasvc.Server, 1706, datasvc.Alias);
        string loggedInIds = string.Join(",", provider.LoggedInUsers(datasvc.Alias));
        string[] loggedIns = loggedInIds.Split(',');
        string concurrentUsers = string.Empty;
        string otherUsers = string.Empty;
        foreach(string loggedIn in loggedIns)
        {
            Sage.Entity.Interfaces.IUser usr = Sage.Platform.EntityFactory.GetById<Sage.Entity.Interfaces.IUser>(loggedIn.Trim());
            if (usr != null)
            {
                if (usr.Type == Sage.Entity.Interfaces.UserType.Concurrent) concurrentUsers += usr.UserInfo.UserName + System.Environment.NewLine;
                if (usr.Type != Sage.Entity.Interfaces.UserType.Concurrent) otherUsers += usr.UserInfo.UserName + System.Environment.NewLine;
            }
                
        }
        throw new Sage.Platform.Application.ValidationException(string.Format(
            "Concurrent License{3}  Total:{0}{3}  Used:{1}{3}  Free:{2}{3}{3}Concurrent Users:{3}{4}{3}{3}Other Users:{3}{5}",
            concurrentTotal, 
            concurrentAvailabelCnt, 
            concurrentTotal-concurrentAvailabelCnt, 
            System.Environment.NewLine,
            concurrentUsers,
            otherUsers));        
    }
Contact Customer FX for your CRM project
We let our expertise speak for itself - let us know how our all-star team can help on your CRM project
About the Author
Kris Halsrud
Kris Halsrud
Kris Halsrud is a Senior Analyst / Developer for Customer FX Corporation.

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Infor CRM Sync for Exchange: Action Required by August 31, 2026

Using Infor CRM Sync for Exchange with Microsoft 365? Your Exchange administrator must update tenant settings by August 31, 2026 to prevent sync disruption.

[Webinar] What’s Coming Next for Infor CRM SLX and Why v10 Matters

See what’s coming next for Infor CRM SLX, including new marketing workflows, automation improvements, and reasons to consider upgrading to v10.

Disable Caching in Infor CRM SLX Web Client

In the rare case caching is causing issues in the Infor CRM SLX web client, it is possible to disable specific types of caching by making edits using Application Architect, and then deploying.

Exploring AI Options for Infor CRM v10

I've started taking a closer look at the AI capabilities built into Infor CRM v10. Over the next several posts, I'll share what I learn. From the built-in features and supported AI providers to implementation considerations, costs, and practical use cases.

Infor CRM SLX 10.0: Delegate Ownership Changes for “Everyone” Records

Learn how the new EveryoneOwnerAssignment secured action in Infor CRM SLX 10.0 allows designated users to change ownership of Everyone-owned records without requiring Administrator access.

Related Articles

Infor CRM Sync for Exchange: Action Required by August 31, 2026

Using Infor CRM Sync for Exchange with Microsoft 365? Your Exchange administrator must update tenant settings by August 31, 2026 to prevent sync disruption.

[Webinar] What’s Coming Next for Infor CRM SLX and Why v10 Matters

See what’s coming next for Infor CRM SLX, including new marketing workflows, automation improvements, and reasons to consider upgrading to v10.

Disable Caching in Infor CRM SLX Web Client

In the rare case caching is causing issues in the Infor CRM SLX web client, it is possible to disable specific types of caching by making edits using Application Architect, and then deploying.

Exploring AI Options for Infor CRM v10

I've started taking a closer look at the AI capabilities built into Infor CRM v10. Over the next several posts, I'll share what I learn. From the built-in features and supported AI providers to implementation considerations, costs, and practical use cases.

Related Videos