# Use uuid as value of id

**URL:** <https://community.neo4j.com/t/use-uuid-as-value-of-id/65004>\
**Category:** Procedures & APOC\
**Tags:** apoc\
**Created:** [November 17, 2023, 6:14pm UTC](https://community.neo4j.com/t/use-uuid-as-value-of-id/65004 "2023-11-17T18:14:53Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![blurbee](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/blurbee/32/30078_2.png) [@blurbee](https://community.neo4j.com/u/blurbee)\
**Post date:** [November 17, 2023, 6:14pm UTC](https://community.neo4j.com/t/use-uuid-as-value-of-id/65004/1 "2023-11-17T18:14:53Z")

</div>

I'm using Neo4j 5.12  
Is there a way to configure neo4j to use uuid values for id instead of incremental numbers? incremental ids are security issue and predictable.

---

<div class="post-metadata">

**Author:** ![glilienfield](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/glilienfield/32/27534_2.png) [@glilienfield](https://community.neo4j.com/u/glilienfield)\
**Post date:** [November 17, 2023, 6:30pm UTC](https://community.neo4j.com/t/use-uuid-as-value-of-id/65004/2 "2023-11-17T18:30:57Z")

</div>

You should not use ids for your unique keys. I suggest creating your own key. The easiest approach is using the randomUUID() method.

---

<div class="post-metadata">

**Author:** ![blurbee](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/blurbee/32/30078_2.png) [@blurbee](https://community.neo4j.com/u/blurbee)\
**Post date:** [November 17, 2023, 7:04pm UTC](https://community.neo4j.com/t/use-uuid-as-value-of-id/65004/3 "2023-11-17T19:04:35Z")

</div>

Thank you. Is there an automated way to add uuid values for any object added into graph db?

I found this link:

> **[UUIDs - APOC Extended Documentation](https://neo4j.com/labs/apoc/4.1/graph-updates/uuid/)**
>
> This section describes procedures that can be used to add UUID properties to nodes.

But, I can't seem to find where to add the property. When I added the apoc.uuid.enabled=true to my neo4j.conf, the graph db does not even start.

---

<div class="post-metadata">

**Author:** ![glilienfield](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/glilienfield/32/27534_2.png) [@glilienfield](https://community.neo4j.com/u/glilienfield)\
**Post date:** [November 17, 2023, 7:21pm UTC](https://community.neo4j.com/t/use-uuid-as-value-of-id/65004/4 "2023-11-17T19:21:47Z")

</div>

The config key-value pair goes in apoc.conf file. Create a text file with that name and place it in the same config folder.
