IBM Support

Adding a user fails with the error user already exists in the ldap identity provider

Troubleshooting


Problem

When a user is deleted and readded to the provider organization in the API Manager UI an error is reported that the user already exists in the user registry, for example, ldap. 

Symptom

To get the complete error stack trace:

  - Open a terminal and ssh to the node where APIC is deployed

  - Get the name of the apim pod using the command:
    kubectl get pods -n <namespace where APIC is deployed> | grep apim
  - Execute : 
    kubectl logs -f --tail 10 pod/mgmt-apim-587f5449f8-wq46h_apim.log -n <namespace where APIC is deployed>
  - Recreate the error in the API Manager UI and the error stack trace would be similar to :
      <timestamp> audit [<transaction_id>] START: >>>>>>>> [POST]: /api/user-registries/682a4a62-ba04-4f09-8330-2ce92af8abcd/0efee2a7-74bd-4158-b73f-643124a0abcd/users
      <timestamp> apim:routes:user_registry [<transaction_id>] Is shared admin user registry ? true
      <timestamp> apim:routes:user [<transaction_id>] checking unique email: subin@dummyserver.com
      <timestamp> apim:error [<transaction_id>] email, subin@dummyserver.com, exists for following users: [{"username":"subin ","url":"/api/user-registries/e7a5744d-ff4e-42f0-950a-1aa6f2a9abcd/0efee2a7-74bd-4158-b73f-643124a0abcd/users/03f0d149-c8f1-4daf-9e7a-7ecffc4cabcd"}]
      <timestamp> bhendi:error [<transaction_id>] Error in POST post:/api/user-registries/:org/:userregistry/users (user.js:create)
        - status : 400
        - message: The user with email subin@dummyserver.com already exists in the subin-ldap identity provider.
        - stack  : Error: The user with email subin@dummyserver.com already exists in the subin-ldap identity provider.
          at error (/app/node_modules/@apic/apic-util/src/util.js:841:11)
          at User.createPreHook (/routes/user.js:150:27)
          at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
          at async User.create (/app/node_modules/bhendi/lib/controller.js:378:9)
          at async dispatch (/app/node_modules/bhendi/mw/dispatcher.js:411:20)
          at async dispatcher (/app/node_modules/bhendi/mw/dispatcher.js:332:5)
        - errors : undefined: {"status":400,"message":["The user with email subin@dummyserver.com already exists in the subin-ldap identity provider."]}
      <timestamp> bhendi:server [<transaction_id>]   - Serializing as application/json
      <timestamp> audit [<transaction_id>] Stack trace for response error: Error: The user with email subin@dummyserver.com already exists in the subin-ldap identity provider.
          at error (/app/node_modules/bhendi/lib/bhendiUtil.js:61:11)
          at dispatch (/app/node_modules/bhendi/mw/dispatcher.js:528:21)
          at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
          at async dispatcher (/app/node_modules/bhendi/mw/dispatcher.js:332:5)
      <timestamp> audit [<transaction_id>] END:   <<<<<<<< FAILURE: [400] response (POST /api/user-registries/682a4a62-ba04-4f09-8330-2ce92af8abcd/0efee2a7-74bd-4158-b73f-643124a0abcd/users) (took 23ms)
      [<transaction_id>] {
          "status": 400,
          "message": [
              "The user with email subin@dummyserver.com already exists in the subin-ldap identity provider."
          ]
      }

Document Location

Worldwide

[{"Type":"MASTER","Line of Business":{"code":"LOB77","label":"Automation Platform"},"Business Unit":{"code":"BU048","label":"IBM Software"},"Product":{"code":"SSMNED","label":"IBM API Connect"},"ARM Category":[{"code":"a8m50000000CeB2AAK","label":"API Connect-\u003ESecurity (SE)-\u003ELDAP"},{"code":"a8m0z000000boPZAAY","label":"API Connect-\u003ESecurity (SE)-\u003EUser Management"},{"code":"a8m0z000000boPUAAY","label":"API Connect-\u003ESecurity (SE)-\u003EUser Registration"}],"ARM Case Number":"TS014058486","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"10.0.5"}]

Log InLog in to view more of this document

This document has the abstract of a technical article that is available to authorized users once you have logged on. Please use Log in button above to access the full document. After log in, if you do not have the right authorization for this document, there will be instructions on what to do next.

Document Information

Modified date:
20 September 2023

UID

ibm17035417