VMware Cloud Foundation 5.1
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.
Issue is resolved in VMware Cloud Foundation 5.2
Workaround:
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')
curl 'https://<sddc_manager_fqdn>/v1/roles' -i -X GET \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer $TOKEN'
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>"
}
} ]’
If you are having issues retrieving tokens the refer Getting Started with Token-Based Authentication for VMware Cloud Foundation APIs