# AWX 24.4.0 - Cannot add Execute and Approve roles to Workflows?

**URL:** <https://forum.ansible.com/t/awx-24-4-0-cannot-add-execute-and-approve-roles-to-workflows/6682>\
**Category:** Get Help\
**Tags:** role, awx\
**Created:** [June 20, 2024, 1:21pm UTC](https://forum.ansible.com/t/awx-24-4-0-cannot-add-execute-and-approve-roles-to-workflows/6682 "2024-06-20T13:21:44Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kevin\_Knox](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/kevin_knox/32/3926_2.png) [@Kevin\_Knox](https://forum.ansible.com/u/Kevin_Knox)\
**Post date:** [June 20, 2024, 1:21pm UTC](https://forum.ansible.com/t/awx-24-4-0-cannot-add-execute-and-approve-roles-to-workflows/6682/1 "2024-06-20T13:21:44Z")

</div>

I can repro this on any Workflow in my 24.4.0 environment. I’ve got 20+ workflows, and on any of them, if I go to Access\Add\Teams\<choose team\>\<Select Execute and Approve\>\<Submit\>, I get back:

> Failed to assign roles properly  
> Details  
> POST api/v2/teams/5/roles/ **400**  
> duplicate key value violates unique constraint “one\_entry\_per\_object\_permission\_and\_role” DETAIL: Key (object\_id, content\_type\_id, codename, role\_id)=(158, 6, view\_workflowjobtemplate, 305) already exists.

When I decide to become clever and Add first the Execute role and then Add the Approve role, I permanently corrupt something in the system such that there are no roles visible in the template. I’ve not found a fix after that. I have to delete and recreate the workflow. Looking at the /api/v2, it seems like the things are there, but they will no longer show up in the GUI.

Right now, to keep people working, I’m having to grant users the Admin role to the Workflows. I really don’t want that. I want them to be able to Execute and Approve them. Any guesses what I could be doing wrong?

This even happens when I copy an existing workflow to experiment or create a new and basically bare workflow.

---

<div class="post-metadata">

**Author:** ![Kevin\_Knox](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/kevin_knox/32/3926_2.png) [@Kevin\_Knox](https://forum.ansible.com/u/Kevin_Knox)\
**Post date:** [June 20, 2024, 1:28pm UTC](https://forum.ansible.com/t/awx-24-4-0-cannot-add-execute-and-approve-roles-to-workflows/6682/2 "2024-06-20T13:28:08Z")

</div>

I’ll add that I was able to do this happily on earlier versions of AWX.

The use case for this workflow is that it runs Job A with complex params in “what if” mode, then pauses for approval, and if approved runs Job A again with the same complex params in “execute” mode. The job collects a list of deletions it will perform, so the user reviews the deletions and takes a backup of those objects before approving the workflow. I literally do want the same user to execute and approve the job.

---

<div class="post-metadata">

**Author:** ![Kevin\_Knox](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/kevin_knox/32/3926_2.png) [@Kevin\_Knox](https://forum.ansible.com/u/Kevin_Knox)\
**Post date:** [June 20, 2024, 4:42pm UTC](https://forum.ansible.com/t/awx-24-4-0-cannot-add-execute-and-approve-roles-to-workflows/6682/3 "2024-06-20T16:42:57Z")

</div>

Is it possible we are not supposed to be adding multiple roles to single teams now? Is that a new requirement? If so, if I want a person to be able to do Execute and Approve, do I need to create 2 groups, grant one access to each group, and add the user to both groups?

---

<div class="post-metadata">

**Author:** ![Kevin\_Knox](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/kevin_knox/32/3926_2.png) [@Kevin\_Knox](https://forum.ansible.com/u/Kevin_Knox)\
**Post date:** [June 21, 2024, 1:27pm UTC](https://forum.ansible.com/t/awx-24-4-0-cannot-add-execute-and-approve-roles-to-workflows/6682/4 "2024-06-21T13:27:08Z")

</div>

Where would I report this as a bug?
