Hello team!
i'm using a Jira automation to try and get the reporter's department in the company. This profile piece is added when they are granted a license to Atlassian - when joining the company.
What I'm trying to get is a label in the ticket, or an update of the ticket organisations, or sth, so that I can then have other automations actioning the auto-rejection of these tickets.
This is how I set up the automation:


But this threw an error:
Error publishing web request. Response HTTP status:
404
Error response HTTP body:
{"message":"null for uri: https://xxxxxxxx.atlassian.net/rest/servicedeskapi/department?accountId=5dc03d0b9833ce0dfd8xxxx","status-code":404}
Any idea how to troubleshoot this or how to get the reporter's team using API? ( I have tried a custom field and have the reporters use this field to give us their team, but the "bad-department" would simply pick a different team and call it a day. The issue is the team has such a high turnover that most training efforts prove unfruitful as the agents just keep on leaving the company or changing depts...)
Any input is highly appreciated here. Thank you!