Error Message: "Cannot insert duplicate key row in object 'tps_user_network_login'.." when setting Network Login on User

Version 5

    Verified Product Versions

    LANDESK Service Desk 7.7.xLANDESK Service Desk 7.8.xLANDESK Service Desk 2016.xLANDESK Asset Central 2016.x

    Environment:

    Service Desk - All Versions

     

    Problem:

    You are getting the below error message when you try to create a user or trying to set the Network Login on an existing user:

     

    "Cannot insert duplicate key row in object 'dbo.tps_user_network_login' with unique index 'index$tps_user_nw_login$nl'. The duplicate key value is (XXXXXX). The statement has been terminated"

     

    error.png

     

    Answer:

    The Network Login will need to be unique and so you cannot have two users with the same Network Login. If you are getting the above error message it means that you already have a user with this Network Login.

    This user can either be an active user or a soft deleted user.

     

    The best way of finding out which user already have this Network Login is to create a Query over your Users.

     

    Create the Query on the System.User Object:

    query.png

     

     

    Add the "Title", "Name" and "Soft Deletion" attributes, which will show as columns.

    Add the Network Logins.Network Login Attribute which will show as a column in a tab at the bottom.

    attributes.png

     

     

    Go to the Criteria Page and add the Network Logins.Network Login as a criteria. Make sure to tick the "Prompt user to specify value" tick box"

    criteria.png

     

     

    Go to the General Page and make sure you tick the "Include soft deleted records"

    general.png

     

     

    Run your Query. In the prompt, add the Network Login you were trying to add to your user.

    running.png

     

    In the result you will see the user that has been given this Network ID.

     

    result.png

     

    Launch the relevant user in your Administration Component and update the Network Login.

    If this user is Soft deleted, this means that you cannot see this user from the front end. So to update this user you will need to undelete this user first. Please see How to undelete (or restore) a user which has been soft deleted.