LDAP users not showing in VMware Cloud Foundation 5.1
search cancel

LDAP users not showing in VMware Cloud Foundation 5.1

book

Article ID: 327185

calendar_today

Updated On:

Products

VMware Cloud Foundation

Issue/Introduction

  • LDAP users not showing in VMware Cloud Foundation 5.1
  • When you select users for an AD within SDDC Manager - it doesn't list the users/groups.
  • The users/groups are visible within vCenter when the domain is added there however.

Environment

VMware Cloud Foundation 5.1

Cause

The issue started to come after UI migrated to public API in 5.1. The UI was doing an offline search on the results fetched by the backend public API and not a dynamic search based on the search criteria. This is because the backend public API didn’t take have search criteria as a parameter which results in the API always returning a set of users for the particular domain.

Resolution

Issue is resolved in VMware Cloud Foundation 5.2

Workaround:

  1. SSH to SDDC Manager VM using vcf and su to root
  2. Get the access token
    TOKEN=$(curl -d '{"username" : "<sso_username>", "<sso_password>" : "sso password”}' -H "Content-Type: application/json" -X POST http://<sddc_manager_ip>/v1/tokens | jq -r '.accessToken')
  3. Get the id of the role which you want to give to the user
    curl 'https://<sddc_manager_fqdn>/v1/roles' -i -X GET \
        -H 'Content-Type: application/json' \
        -H 'Accept: application/json' \
        -H 'Authorization: Bearer $TOKEN'
  4. Add the user
    curl 'https://<sddc_manager_fqdn>/v1/users' -i -X POST \
        -H 'Content-Type: application/json' \
        -H 'Accept: application/json' \
        -H 'Authorization: Bearer $TOKEN' \
        -d '[ {
      "name" : "[email protected]",
      "domain" : "vsphere.local",
      "type" : "USER",
      "role" : {
        "id" : "<id obtained from Step #2>"
      }
    }, {
      "name" : "[email protected]",
      "domain" : "vsphere.local",
      "type" : "USER",
      "role" : {
        "id" : "<id obtained from Step #2>"
      }
    }, {
      "name" : "SERVICE_USER_1",
      "type" : "SERVICE",
      "role" : {
        "id" : "<id obtained from Step #2>"
      }
    } ]’
    
  5. Check the UI if the user has been added

Additional Information

If you are having issues retrieving tokens the  refer Getting Started with Token-Based Authentication for VMware Cloud Foundation APIs