diff --git a/lib/ansible/modules/web_infrastructure/ansible_tower/tower_credential.py b/lib/ansible/modules/web_infrastructure/ansible_tower/tower_credential.py index ffccc645ec1..3851f5fe7f7 100644 --- a/lib/ansible/modules/web_infrastructure/ansible_tower/tower_credential.py +++ b/lib/ansible/modules/web_infrastructure/ansible_tower/tower_credential.py @@ -266,7 +266,7 @@ def main(): if module.params.get('user'): user_res = tower_cli.get_resource('user') - user = user_res.get(name=module.params.get('user')) + user = user_res.get(username=module.params.get('user')) params['user'] = user['id'] if module.params.get('team'):