7
Views
0
Comments
[Active Directory Group Mapping] Login error while mapping Active Directory Groups to Outsystems Groups
Forge component by Hernâni Fernandes
1
Published on 02 Jun 2019
Application Type
Traditional Web

We configuring AD groups to Outsystems groups using Active Directory Group Mapping:

  1. We created the group on Outsystems Users application and assigned a role to the group.

  2. We mapped the AD group to the Outsysetms Group



  3. We change the login process in our OutSystems applications as described here: https://success.outsystems.com/Documentation/Development_FAQs/How_to_map_Active_Directory_Groups_to_OutSystems_Roles

The first time the user logs in, it works fine. The Active Directory Group Mapping creates the user on the Outsystems Users application and assigns him the role(s) that were defined on the Outsystems Group.

After the first login and the user's creation on the Outsystems Users application, every subsequent login causes an exception:

Cannot insert duplicate key row in object 'dbo.ossys_User_Role' with unique index 'OSIDX_OSSYS_USER_ROLE_7USER_ID_7ROLE_ID_9TENANT_ID'. The duplicate key value is (1035, 101, 20).
The statement has been terminated.

 The error is being generated on the  "CreateOrUpdateUser_Role2" of the "CreateUserRolesFromGroupMappings" action of the ActiveDirectoryRolesCore application:

Any help is appreciated.