Query to get Locked Login / user list

Query to get Locked Login / user list

Version : 11026
DB : PGSQL / MSSQL


OUTPUT :




SELECT AaaUser.first_name AS "FIRST_NAME",
AaaUser.last_name AS "Last name",
LockedAccountDetails.LOCK_ID,
longtodate(AaaAccBadLoginStatus.UPDATEDTIME) As "Lock Date",
AaaLogin.NAME,
sduser.EMPLOYEEID,
sduser.STATUS,
sduser.JOBTITLE FROM LockedAccountDetails
LEFT JOIN AaaAccount ON LockedAccountDetails.ACCOUNT_ID=AaaAccount.ACCOUNT_ID
LEFT JOIN AaaLogin ON AaaAccount.LOGIN_ID=AaaLogin.LOGIN_ID
LEFT JOIN AaaUser ON AaaLogin.USER_ID=AaaUser.USER_ID
LEFT JOIN AaaUserContactInfo ON AaaUser.USER_ID=AaaUserContactInfo.USER_ID
LEFT JOIN AaaContactInfo ON AaaUserContactInfo.CONTACTINFO_ID=AaaContactInfo.CONTACTINFO_ID
LEFT JOIN SDUser ON AaaUser.USER_ID=SDUser.USERID
LEFT JOIN AaaAccBadLoginStatus ON AaaAccount.ACCOUNT_ID=AaaAccBadLoginStatus.ACCOUNT_ID  
WHERE   ( ( ( ( LockedAccountDetails.IS_ACCOUNT_LOCKED = 'true' ) )  ) )

                  New to ADSelfService Plus?