Search code examples
attask

AtTask User Creation


Does anyone have a example of creating a AtTask user using Invoke-RestMethod? Have tried the following Invoke-WebRequest "https://company.attask-ondemand.com/attask/api/user?emailAddr=user@domain.com&firstName=user&lastName=name&password=Pa$$w0rd&sessionID=jjsaduu298901283123j" -Method post which returns bad request... Thanks in advance!


Solution

  • Place the new user information in a json array in a field named updates. Specify the method you are doing. in this case: &method=post. Then you need to pass the session id or the admin's username and password. I changed your above url to what it needs to look like.

    "https://company.attask-ondemand.com/attask/api/user?updates={ emailAddr:user@domain.com,firstName:user,lastName:name,password:Pa$$w0rd}&method=post&sessionID=jjsaduu298901283123j

    or

    "https://company.attask-ondemand.com/attask/api/user?updates={ emailAddr:user@domain.com,firstName:user,lastName:name,password:Pa$$w0rd}&method=post&username=admin_email&password=admin_password

    Let me know if that does not work.