Duplicate users while importing from AD

Duplicate users while importing from AD

Use the below queries;

To find the number of duplicate users: 

SELECT objectguid, COUNT(*) TotalCount FROM aduser GROUP BY objectguid HAVING COUNT(*) > 1;
SELECT userid, samaccname, objectguid, COUNT(*) TotalCount FROM aduser GROUP BY userid, samaccname, objectguid HAVING COUNT(*) > 1;

To update the local user to AD user please use the below query,

update aduser set userid="local userid" where samaccname='XXXX';

                  New to ADSelfService Plus?

                    • Related Articles

                    • How to import users from AD under a site value configured in different attributes of AD

                      Applicable for build - 14306 and above. SDP MSP uses attribute values while importing from AD. By Default , the officesite name in AD config is mapped to SDP MSP Site field. In case users wants to use different field for the same purpose, use its ...
                    • Delete Sync user by shifting to particular OU.

                      If the user needs to get deleted when the user is shifted to a  particular OU in  Active Directory. The advice is to change the permission of that particular OU, by denying the read access for the user who configured in the product for the particular ...
                    • How to configure SAML with Azure AD

                      This guide will help us configure SAML for users who want to use Azure AD as their IdP and also give you insights on a few issues that you might run into while configuring SAML in an Azure Environment. In an ideal environment, customers will have an ...
                    • AD Sync issue_Rootpath failure

                      Error trace: 09:48:46:989]|[10-31-2019]|[com.adventnet.servicedesk.asset.util.WorkStationDiscoverUtil]|[INFO]|[62064]: Log message from WMI task : mwc-dc-01 - LDAP Search : Root Path Failure. (0x8007052e)| ...
                    • Login diectly with SAML / Query to enable AD or Local Auth when there is an issue with SAML

                      Issue: When users have AD and/or local authentication enabled along with SAML, the login page is shown when a link from an email is clicked and users need to click "Login with SAML" again. Workaround 1: You can bookmark, <sdp_url>/SamlRequestServlet ...