# Getting user credentials list in admin api

**URL:** <https://forum.keycloak.org/t/getting-user-credentials-list-in-admin-api/4671>\
**Category:** Miscellanaeous\
**Tags:** admin-rest\
**Created:** [September 3, 2020, 4:55am UTC](https://forum.keycloak.org/t/getting-user-credentials-list-in-admin-api/4671 "2020-09-03T04:55:20Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![alex88](https://yyz2.discourse-cdn.com/free1/user_avatar/forum.keycloak.org/alex88/32/325_2.png) [@alex88](https://forum.keycloak.org/u/alex88)\
**Post date:** [September 3, 2020, 4:55am UTC](https://forum.keycloak.org/t/getting-user-credentials-list-in-admin-api/4671/1 "2020-09-03T04:55:20Z")

</div>

Hello everyone,

is there a way to know if a user has a password set? I’m using the keycloak-admin npm package, when I get a single user I have:

```auto
{
  id: '18d50049-3eee-44f4-8d1f-26d281659d89',
  createdTimestamp: 1597114304501,
  username: 'a@a.com',
  enabled: true,
  totp: false,
  emailVerified: true,
  firstName: 'A',
  lastName: 'B',
  email: 'a@a.com',
  disableableCredentialTypes: [],
  requiredActions: [],
  notBefore: 0,
  access: {
    manageGroupMembership: true,
    view: true,
    mapRoles: true,
    impersonate: false,
    manage: true
  }
}

```

and it doesn’t return the list of credentials.

Is there a way to do so?

---

<div class="post-metadata">

**Author:** ![mahen](https://avatars.discourse-cdn.com/v4/letter/m/9d8465/32.png) [@mahen](https://forum.keycloak.org/u/mahen)\
**Post date:** [September 3, 2020, 5:00am UTC](https://forum.keycloak.org/t/getting-user-credentials-list-in-admin-api/4671/2 "2020-09-03T05:00:40Z")

</div>

Hi Alex,

Depending on what version of keycloak you are using, there is a GET /{realm}/users/{id}/credentials API call: [https://www.keycloak.org/docs-api/9.0/rest-api/index.html#\_credentialrepresentation](https://www.keycloak.org/docs-api/9.0/rest-api/index.html#_credentialrepresentation)

---

<div class="post-metadata">

**Author:** ![alex88](https://yyz2.discourse-cdn.com/free1/user_avatar/forum.keycloak.org/alex88/32/325_2.png) [@alex88](https://forum.keycloak.org/u/alex88)\
**Post date:** [September 3, 2020, 5:04am UTC](https://forum.keycloak.org/t/getting-user-credentials-list-in-admin-api/4671/3 "2020-09-03T05:04:54Z")

</div>

Oh my, I’ve no idea how I was able to miss that.

Thanks @mahen!

---

<div class="post-metadata">

**Author:** ![alex88](https://yyz2.discourse-cdn.com/free1/user_avatar/forum.keycloak.org/alex88/32/325_2.png) [@alex88](https://forum.keycloak.org/u/alex88)\
**Post date:** [September 3, 2020, 5:07am UTC](https://forum.keycloak.org/t/getting-user-credentials-list-in-admin-api/4671/4 "2020-09-03T05:07:35Z")

</div>

Oh it seems that the keycloak-admin package doesn’t support that

> <https://github.com/keycloak/keycloak-nodejs-admin-client/blob/8e889ed85ba994a1b1281e6fddf0c1021cac9f71/src/resources/users.ts#L25>

I’ll just make a custom request then
