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.
Nov 23, 2021 08:14 PM
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.
Nov 24, 2021 08:28 AM
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.
Nov 24, 2021 08:28 AM
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.
Nov 24, 2021 09:27 AM