cyberark / ansible-security-automation-collection

CyberArk Ansible Security Automation Collection
MIT License
60 stars 39 forks source link

Unable to add account using cyberark_account module #59

Open prabhushankar333 opened 1 year ago

prabhushankar333 commented 1 year ago

Hi Team,

I am unable to add account using cyberark account module, the error says "'Missing Mandatory parameter: [AccountDetails].'" Could please check and let me know if i missed anything on this.

ansible version i have used: ansible [core 2.13.10] cyberark module version : 1.0.19

ansible code:

- name: Logon - Not use_shared_logon_authentication
  cyberark_authentication:
    api_base_url: https://pv.test.com/
    username: "test user"
    password: "test123"
    use_radius_authentication: yes
- debug:
    msg: "{{ cyberark_session }}" 

- name: Creating an Account using the PAS WebServices SDK
  cyberark_account:
    logging_level: DEBUG
    identified_by: "address,username,platform_id"
    safe: "IT_Infrastructure"
    address: "cyberark.local"
    username: "test account"
    platform_id: test account
    secret: "@N&Ibl3!"
    platform_account_properties:
        LogonDomain: "test account"
        OwnerName: "test user"
    secret_management:
        automatic_management_enabled: true
    state: present
    cyberark_session: "{{ cyberark_session }}"
  register: cyberarkaction

Error while running the playbook:

"msg": "Error while performing add_account.Please validate parameters provided.\n*** end_point=********/PasswordVault/api/Accounts\n ==> {'ErrorCode': 'PASWS017E', 'ErrorMessage': 'Missing Mandatory parameter: [AccountDetails].'}",
prabhushankar333 commented 1 year ago

Did any one had chance to check this?

szh commented 1 year ago

@cyberark-bizdev Can you please take a look?

compostCY commented 1 year ago

Hello Prabhushankar333: Please pass in a platform_id that is valid - 'test account' doesn't appear to be a valid platform id. The error is expected if platform id is invalid or doesn't exist. I use the sample from the doc with the correct platform id that is out of the box and it's fine. PAS_Create_ACCT