# awxkit, not sure how to bind a user to a team

**URL:** <https://forum.ansible.com/t/awxkit-not-sure-how-to-bind-a-user-to-a-team/34522>\
**Category:** AWX Project\
**Tags:** awx\
**Created:** [January 27, 2021, 3:25pm UTC](https://forum.ansible.com/t/awxkit-not-sure-how-to-bind-a-user-to-a-team/34522 "2021-01-27T15:25:51Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![GoMatrix\_Hosting](https://avatars.discourse-cdn.com/v4/letter/g/cab0a1/32.png) [@GoMatrix\_Hosting](https://forum.ansible.com/u/GoMatrix_Hosting)\
**Post date:** [January 27, 2021, 3:25pm UTC](https://forum.ansible.com/t/awxkit-not-sure-how-to-bind-a-user-to-a-team/34522/1 "2021-01-27T15:25:51Z")

</div>

Trying to assign a user to a team on AWX 15.0.1 using awx-cli/tower-cli, but it doesn’t seem to be able to find the requested objects:

[https://manpages.debian.org/testing/ansible-tower-cli/tower\_cli.1.en.html#Organization\_and\_Team\_Roles](https://manpages.debian.org/testing/ansible-tower-cli/tower_cli.1.en.html#Organization_and_Team_Roles)

```auto
$ tower-cli role grant --user 'billyjean@protonmail.com' --target-team '35' --type 'member'

Error: The requested object could not be found.

```

A similar attempt with the new awxkit:

```auto
$ ~/.local/bin/awx roles modify --user 'billyjean@protonmail.com' --target-team '35' --type 'member' --conf.host https://panel.topgunmatrix.com --conf.username admin --conf.password xxxxxxxxxxxxxxxxxxxx

usage: awx roles [-h] action ...

positional arguments:

action

list

get

optional arguments:

-h, --help show this help message and exit

awx roles: argument action: invalid choice: 'modify' (choose from 'list', 'get')

```

Does anyone know how to assign a user to a team using either of these?

Cheers,

---

<div class="post-metadata">

**Author:** ![GoMatrix\_Hosting](https://avatars.discourse-cdn.com/v4/letter/g/cab0a1/32.png) [@GoMatrix\_Hosting](https://forum.ansible.com/u/GoMatrix_Hosting)\
**Post date:** [January 27, 2021, 3:26pm UTC](https://forum.ansible.com/t/awxkit-not-sure-how-to-bind-a-user-to-a-team/34522/2 "2021-01-27T15:26:46Z")

</div>

Found a rough solution here but it’s not ideal as AWX might have several jobs queued up or might just be running too slow for it to happen in time: [https://www.reddit.com/r/awx/comments/l1uafv/awxcli\_cant\_assign\_user\_to\_team/](https://www.reddit.com/r/awx/comments/l1uafv/awxcli_cant_assign_user_to_team/)

---

<div class="post-metadata">

**Author:** ![GoMatrix\_Hosting](https://avatars.discourse-cdn.com/v4/letter/g/cab0a1/32.png) [@GoMatrix\_Hosting](https://forum.ansible.com/u/GoMatrix_Hosting)\
**Post date:** [January 28, 2021, 1:45am UTC](https://forum.ansible.com/t/awxkit-not-sure-how-to-bind-a-user-to-a-team/34522/3 "2021-01-28T01:45:45Z")

</div>

I was able to resolve the race condition i was having with it nicely, it’s not the end of the world if nobody answers this. 🙂
