# Custom Secret-id using CLI?

**URL:** <https://discuss.hashicorp.com/t/custom-secret-id-using-cli/54467>\
**Category:** Vault\
**Created:** [June 1, 2023, 3:12pm UTC](https://discuss.hashicorp.com/t/custom-secret-id-using-cli/54467 "2023-06-01T15:12:31Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![MrBaseball34](https://sea2.discourse-cdn.com/hashicorp/user_avatar/discuss.hashicorp.com/mrbaseball34/32/29122_2.png) [@MrBaseball34](https://discuss.hashicorp.com/u/MrBaseball34)\
**Post date:** [June 1, 2023, 3:12pm UTC](https://discuss.hashicorp.com/t/custom-secret-id-using-cli/54467/1 "2023-06-01T15:12:31Z")

</div>

I understand how to set a custom secret-id using the API but how would I do it using the CLI?

Does this look right?

`vault write -f auth/approle/role/<AppRole>/custom-secret-id secret-id=<Custom Secret ID>`

---

<div class="post-metadata">

**Author:** ![MrBaseball34](https://sea2.discourse-cdn.com/hashicorp/user_avatar/discuss.hashicorp.com/mrbaseball34/32/29122_2.png) [@MrBaseball34](https://discuss.hashicorp.com/u/MrBaseball34)\
**Post date:** [June 1, 2023, 3:16pm UTC](https://discuss.hashicorp.com/t/custom-secret-id-using-cli/54467/2 "2023-06-01T15:16:08Z")

</div>

> [@MrBaseball34](#):
>
> vault write -f auth/approle/role//custom-secret-id secret-id=

This is the correct way, after testing:  
`vault write -f auth/approle/role/<AppRole>/custom-secret-id secret_id=<Custom Secret ID>`
