• HashiCorp Developer

  • HashiCorp Cloud Platform
  • Terraform
  • Packer
  • Consul
  • Vault
  • Boundary
  • Nomad
  • Waypoint
  • Vagrant
Vault
  • Install
  • Tutorials
  • Documentation
  • API
  • Try Cloud(opens in new tab)
  • Sign up
Vault Home

API

Skip to main contentOverview
  • Client Libraries
  • Related Tools

    • Overview
    • Active Directory
    • AliCloud
    • AWS
    • Azure
    • Consul
    • Cubbyhole
    • Google Cloud
    • Google Cloud KMS
      • Overview
      • Entity
      • Entity Alias
      • Group
      • Group Alias
      • Identity Tokens
      • Lookup
      • OIDC Provider
    • KMIP
      ENTERPRISEENTERPRISE
    • Kubernetes
    • MongoDB Atlas
    • Nomad
    • LDAP
    • PKI
    • RabbitMQ
    • SSH
    • Terraform Cloud
    • TOTP
    • Transform
      ENTERPRISEENTERPRISE
    • Transit

  • Resources

  • Tutorial Library
  • Certifications
  • Community Forum
    (opens in new tab)
  • Support
    (opens in new tab)
  • GitHub
    (opens in new tab)
  1. Developer
  2. Vault
  3. API
  4. Secrets Engines
  5. Identity
  6. Lookup
  • Vault
  • v1.11.x
  • v1.10.x
  • v1.9.x
  • v1.8.x
  • v1.7.x
  • v1.6.x
  • v1.5.x
  • v1.4.x

Lookup an Entity

This endpoint queries the entity based on the given criteria. The criteria can be name, id, alias_id, or a combination of alias_name and alias_mount_accessor.

MethodPath
POST/identity/lookup/entity

Parameters

  • name (string: "") – Name of the entity.

  • id (string: "") - ID of the entity.

  • alias_id (string: "") - ID of the alias.

  • alias_name (string: "") - Name of the alias. This should be supplied in conjunction with alias_mount_accessor.

  • alias_mount_accessor (string: "") - Accessor of the mount to which the alias belongs to. This should be supplied in conjunction with alias_name.

Sample Payload

{
  "id": "043fedec-967d-b2c9-d3af-0c467b04e1fd"
}

Sample Request

$ curl \
    --header "X-Vault-Token: ..." \
    --request POST \
    --data @payload.json \
    http://127.0.0.1:8200/v1/identity/lookup/entity

Sample Response

{
  "data": {
    "aliases": [],
    "creation_time": "2017-11-13T21:01:33.543497Z",
    "direct_group_ids": [],
    "group_ids": [],
    "id": "043fedec-967d-b2c9-d3af-0c467b04e1fd",
    "inherited_group_ids": [],
    "last_update_time": "2017-11-13T21:01:33.543497Z",
    "merged_entity_ids": null,
    "metadata": null,
    "name": "entity_43cc451b",
    "policies": null
  }
}

Lookup a Group

This endpoint queries the group based on the given criteria. The criteria can be name, id, alias_id, or a combination of alias_name and alias_mount_accessor.

MethodPath
POST/identity/lookup/group

Parameters

  • name (string: "") – Name of the group.

  • id (string: "") - ID of the group.

  • alias_id (string: "") - ID of the alias.

  • alias_name (string: "") - Name of the alias. This should be supplied in conjunction with alias_mount_accessor.

  • alias_mount_accessor (string: "") - Accessor of the mount to which the alias belongs to. This should be supplied in conjunction with alias_name.

Sample Payload

{
  "id": "70a4bdef-9da3-4460-b524-bb08542eef25"
}

Sample Request

$ curl \
    --header "X-Vault-Token: ..." \
    --request POST \
    --data @payload.json \
    http://127.0.0.1:8200/v1/identity/lookup/group

Sample Response

{
  "data": {
    "alias": {},
    "creation_time": "2017-11-13T21:06:44.475587Z",
    "id": "70a4bdef-9da3-4460-b524-bb08542eef25",
    "last_update_time": "2017-11-13T21:06:44.475587Z",
    "member_entity_ids": [],
    "member_group_ids": null,
    "metadata": null,
    "modify_index": 1,
    "name": "group_eaf2aab1",
    "policies": null,
    "type": "internal"
  }
}
Edit this page on GitHub

On this page

  1. Lookup an Entity
  2. Lookup a Group
Give Feedback(opens in new tab)
  • Certifications
  • System Status
  • Terms of Use
  • Security
  • Privacy
  • Trademark Policy
  • Trade Controls
  • Give Feedback(opens in new tab)