[IdP] Duplicate Accounts Created

[IdP] Duplicate Accounts Created

  
Forge Component
(26)
Published on 4 Jul by Telmo Martins
26 votes
Published on 4 Jul by Telmo Martins

I have been using your IDP connector for a few months and I have discovered that where a user accesses an app using a new user name it creates a new account in the OS Users entity rather than updating the old one.  


The Object ID used in our AD to uniquely identify the user remains the same in our AD and this is mapped to the external id in the IDPconfig settings. Can you tell me what I need to change in the IDP Connector to ensure the external id is checked before a new account is created (as i assume its currently only matching usernames?)


Any help would be greatly appreciated


Solution

Hi Liz,

Without customize the component for what you want to achieve, if that Object ID is not in the claims and it's actual SAML NameID, do not map the Username attribute; or if Object ID it's a claim, map that claim as username (and also as external ID), The implications this way is that the Object ID will be OutSystems username.


If you want to update the existing username you will need to customize the component namely  on User_Check action. Change the first aggregate to query by external Id instead of username, and on the "Update user" assign widget update the User.Username as well.

Regards

Solution

Thanks.  That worked perfectly