A new Flexera Community experience is coming on November 18th, click here for more information.

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

App Portal User Sync Function

Scenario: Imported all users from SCCM and found that this was not filtered appropriately (svc accounts and admin accounts were showing).

We have changed the user sync query to exclude said accounts but this does not change our imported users. Does doing a sync remove records that are no longer showing in the sync query? Trying to figure out how to remove the excess as it is messing with App Portal usage licensing.

(1) Solution
CharlesW
By Level 12 Flexeran
Level 12 Flexeran

App Portal will not clean either the WD_User or WD_computer tables, so these tables may contain stale entries, which are no longer included the new queries. You should be able to simply use a "delete from" query, and then force a sync again using "sync data now".  As part of your maintenance routine, you might try scheduling the following queries to run, so that users/computers which have not been updated in the last 7 days will be removed from the tables:

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

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

Note that in 2019R1 and later, App Portal does clean up stale relationships in WD_UserComputerMap.

View solution in original post

(1) Reply
CharlesW
By Level 12 Flexeran
Level 12 Flexeran

App Portal will not clean either the WD_User or WD_computer tables, so these tables may contain stale entries, which are no longer included the new queries. You should be able to simply use a "delete from" query, and then force a sync again using "sync data now".  As part of your maintenance routine, you might try scheduling the following queries to run, so that users/computers which have not been updated in the last 7 days will be removed from the tables:

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

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

Note that in 2019R1 and later, App Portal does clean up stale relationships in WD_UserComputerMap.