Query to show list of contacts that are assigned to an account but not have a login

Query to show list of contacts that are assigned to an account but not have a login

The below query shows the list of contacts that are assigned to an account, but does not have a login. 


SELECT org.NAME AS "Account Name" ,aaauser.FIRST_NAME AS " Contact with no login" FROM AaaUser aaauser LEFT JOIN AaaUserContactInfo user_contact ON aaauser.USER_ID=user_contact.USER_ID LEFT JOIN AaaContactInfo ucinfo ON user_contact.CONTACTINFO_ID=ucinfo.CONTACTINFO_ID LEFT JOIN SDUser sduser ON aaauser.USER_ID=sduser.USERID LEFT JOIN Customer_Requester custreq ON sduser.USERID=custreq.REQUESTER_ID LEFT JOIN Customer cust ON custreq.CUSTOMER_ID=cust.CUSTOMER_ID LEFT JOIN AaaOrganization org ON cust.CUSTOMER_ID=org.ORG_ID LEFT JOIN DepartmentUser dep_user ON sduser.USERID=dep_user.USERID  left join aaalogin aaalogin on aaauser.user_id=aaalogin.user_id where aaauser.first_name not in (select name from aaalogin) and org.NAME not like '%Not Assigned%'


                  New to ADManager Plus?

                    New to ADSelfService Plus?

                      • Related Articles

                      • Login Frequency Query Report

                        The below report would help us find the last logged in time of the users in SCP 11.0 SELECT AaaUser.FIRST_NAME "Technician",        MAX(AaaLogin.NAME) "LoginName",        MAX(AaaContactInfo.EMAILID) "Email",        MAX(AaaAccSession.USER_HOST) "IP ...
                      • Steps to Import accounts / contacts through schedule csv from SCP 11001 build

                        This is applicable only from 11001 builds. How to do? # Based on the Globalconfig table entry with category as 'CSVUserImportSchedule', this can be turned ON/OFF. By default this is turned OFF. Query to enable the feature - update Globalconfig set ...
                      • Custom Script to enable "remove login" option for contacts in SCP 8.1

                        Use case: To disable login for contacts in bulk from Contacts module. The attached CustomScripts.js can be moved to SupportCenter/custom/scripts directory.  Browser cache needs to be cleared for the script to work as expected
                      • List of contacts logged into the system

                        Mysql select aas.session_id "SessionID", aal.name "User Name",aau.FIRST_NAME "Contact Name",org.NAME "Account Name", aas.user_host "User Host", aas.application_host "Application Host", longtodate(aas.opentime) "Start Time", longtodate(aas.closetime) ...
                      • query to find the unapproved contacts -> PGSQL

                        Below is the query to find the unapproved contacts -> PGSQL-> can be used from version 11 SELECT aaauser.User_id AS "User ID", aaauser.first_name "First name", aaauser.last_name "Last name", hd.id "Portal ID", hd.displayname "Portal Name", ...