# Using code to create objects, it is possible to use credentials from another organisation.

**URL:** <https://forum.ansible.com/t/using-code-to-create-objects-it-is-possible-to-use-credentials-from-another-organisation/44300>\
**Category:** Get Help\
**Tags:** awx, ee\
**Created:** [August 14, 2025, 6:38pm UTC](https://forum.ansible.com/t/using-code-to-create-objects-it-is-possible-to-use-credentials-from-another-organisation/44300 "2025-08-14T18:38:56Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![craige](https://avatars.discourse-cdn.com/v4/letter/c/b782af/32.png) [@craige](https://forum.ansible.com/u/craige)\
**Post date:** [August 14, 2025, 6:38pm UTC](https://forum.ansible.com/t/using-code-to-create-objects-it-is-possible-to-use-credentials-from-another-organisation/44300/1 "2025-08-14T18:38:57Z")

</div>

**When configuring a system with code, it is possible to use a credential that “belongs” to another org.**

```auto
  - name: cicd-awx-ping
    job_type: run
    inventory: inv-cicd_test
    project: 'DEV/TEST ansible-awx'
    playbook: ping.yml
    organization: cicd
    execution_environment: 'Automation Hub Default execution environment'
    verbosity: '0'
    credentials:
      - "DevOps-awx_credential"
    state: present

  - name: DevOps-awx_credential
    description: local service account user
    credential_type: Machine
    organization: DevOps
    inputs:
      username: "svc.awx.admin"
      ssh_key_data: "{{ lookup('file','...........') }}"
    state: present

```

Templates should not be able to use credentials from another Organisation.

---

<div class="post-metadata">

**Author:** ![anon81884396](https://avatars.discourse-cdn.com/v4/letter/a/b782af/32.png) [@anon81884396](https://forum.ansible.com/u/anon81884396)\
**Post date:** [August 14, 2025, 10:24pm UTC](https://forum.ansible.com/t/using-code-to-create-objects-it-is-possible-to-use-credentials-from-another-organisation/44300/2 "2025-08-14T22:24:23Z")

</div>

If you are an admin in AWX (I assume you are asking about AWX), you can assign a credential from any org to a job template. If you are a non-admin user, you are limited to the credentials in the org(s) you belong to. It’s a pretty easy thing to see for yourself.
