diff --git a/changelogs/fragments/9845-consul_token_idempotency.yml b/changelogs/fragments/9845-consul_token_idempotency.yml
new file mode 100644
index 0000000000..6fe536bbd0
--- /dev/null
+++ b/changelogs/fragments/9845-consul_token_idempotency.yml
@@ -0,0 +1,2 @@
+minor_changes:
+  - consul_token - fix idempotency when ``policies`` or ``roles`` are supplied by name (https://github.com/ansible-collections/community.general/issues/9841, https://github.com/ansible-collections/community.general/pull/9845).
diff --git a/plugins/modules/consul_token.py b/plugins/modules/consul_token.py
index c8bc8bc279..6cb8b38b84 100644
--- a/plugins/modules/consul_token.py
+++ b/plugins/modules/consul_token.py
@@ -225,7 +225,7 @@ def normalize_link_obj(api_obj, module_obj, key):
 
     for obj in module_objs:
         identifier = obj.get("ID")
-        name = obj.get("Name)")
+        name = obj.get("Name")
         if identifier and not name and identifier in id_to_name:
             obj["Name"] = id_to_name[identifier]
         if not identifier and name and name in name_to_id:
diff --git a/tests/integration/targets/consul/tasks/consul_token.yml b/tests/integration/targets/consul/tasks/consul_token.yml
index b328d0939d..55a39950d1 100644
--- a/tests/integration/targets/consul/tasks/consul_token.yml
+++ b/tests/integration/targets/consul/tasks/consul_token.yml
@@ -67,7 +67,7 @@
     state: present
     accessor_id: 07a7de84-c9c7-448a-99cc-beaf682efd21
     policies:
-      - id: "{{ create_result.token.Policies[-1].ID }}"
+      - name: foo-access2
   register: result
 
 - assert: