The Community is now in read-only mode to prepare for the launch of the new Flexera Community. During this time, you will be unable to register, log in, or access customer resources. Click here for more information.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

App Portal - How to remove inactive users without removing them in AD?

dcannon
By
Level 3

Hi. We are looking for instructions on how to remove inactive users who are consuming a App Portal / App Broker license without touching AD. Please advise. 

(1) Solution

CharlesW
By Level 12 Flexeran
Level 12 Flexeran

Under settings->General, what is the "licenseEntity" displayed as? If "USER" then App Broker will use the count returned by the following query (run against the App Broker DB):

select Count(UniqueName) from wd_User
where lastupdate > DATEADD(day, -7, GETDATE()) and UniqueName is not null

Basically, this means that users who are inactive for 7 days will not be counted against the "Licenses Used" count.. If you choose to, you could always remove the inactive users from the database by running the following query:

delete from wd_user 
where LastUpdate <= DATEADD(day,-7,GETDATE()) 

Again, this is not strictly necessary, as these users are not counted against the license count. 

If you are not using a USER based license, let me know, as the count is generated in a different way.


 

View solution in original post

(3) Replies

CharlesW
By Level 12 Flexeran
Level 12 Flexeran

Under settings->General, what is the "licenseEntity" displayed as? If "USER" then App Broker will use the count returned by the following query (run against the App Broker DB):

select Count(UniqueName) from wd_User
where lastupdate > DATEADD(day, -7, GETDATE()) and UniqueName is not null

Basically, this means that users who are inactive for 7 days will not be counted against the "Licenses Used" count.. If you choose to, you could always remove the inactive users from the database by running the following query:

delete from wd_user 
where LastUpdate <= DATEADD(day,-7,GETDATE()) 

Again, this is not strictly necessary, as these users are not counted against the license count. 

If you are not using a USER based license, let me know, as the count is generated in a different way.


 

To clarify, "inactive" in this sense doesn't mean someone that hasn't used App Portal in 7 days.  It means that user has not been present in the source data for the user sync (usually SCCM) in the past 7 days.  One thing to note is that SCCM usually has a delay (don't remember if it's 30/60/90 days) before removing users that are no longer present in AD.  If you want more control over which users get synced into App Portal (and therefore consume a license), you can create a collection in SCCM and then use that collection as a limiter in your custom user sync query.

As for deleting users from WD_Users, I don't generally recommend doing that, because any historical request information under My Apps will no longer be linked to those users.  You could potentially make a slight modification to the query Charlie provided above so that it only removes "inactive" users that also don't have any prior request history.

Anything expressed here is my own view and not necessarily that of my employer, Flexera. If my reply answers a question you have raised, please click "ACCEPT AS SOLUTION".

TMGSLM
By
Level 4

Hi! @jdempsey , @CharlesW 

We ran the same query-

{select Count(UniqueName) from wd_User
where lastupdate > DATEADD(day, -7, GETDATE()) and UniqueName is not null}

 

However, getting a different count than what is shown on App-portal's General page.