Hello and thank You kindly for your time!
I was tasked to make a system where:
- a JIRA ticket would be assigned an approver
-the ticket would be set to an "Awaiting Approval" status
-the assigned approver would receive a Teams card letting them know they have a JIRA Ticket to approve
-the Teams card would have *active buttons* to click to "Approve" or "Decline"
-the user's Teams card response would be sent back to JIRA and the appropriate JIRA approval status would be updated.
I am using:
- a JSM Space, and an API created in Atlassian on my account.
- JSM Automation
- Microsoft Power Automate (with Webhook)
- Teams
- *Note: JIRA Cloud App Integration in Teams WAS NOT Necessary for this to work
Thanks to the JIRA Community and some AI help, I am able to get this system working in Teams!
YAY!
...but ONLY when I'm the Approver.
Awwww.
Seems like the API I created in JIRA (Atlassian)) works perfectly fine when I am the Approver: sending the Teams card to my Teams, registering my button press in the Teams card, sending the answer back to JIRA via the API I created on my account, and successfully updating the ticket's Approval status with "Approved" or "Declined".
BUT.
When making another test user an approver? He gets the Teams card with the buttons OK. and can click his response, OK; But Power Automate, using my credentials to authenticate the API to send his response back gives a 403 Forbidden error in Power Automate (or maybe from JIRA that Power Automate is relaying?)
If I can somehow get the other user's answer, then use my authenticated API to upload their answer, that's pretty much the last task to fix. Or get that user's answer to use my API (that I'm authenticating in Power Automate correctly) would also work.
I did read that the JIRA security for one user using another user's API is the sticking point here. Is this the issue? Can It be worked around? I'm not a developer by trade, and am just learning about API's (JIRA's specifically), but I can code well enough.
I'm THIS CLOSE to making this work for the staff, so any thoughts are greatly appreciated.
Take care and be well!
Maybe try using an Atlassian service account instead of your personal account and API token? Note that if you use a service account the URL you use changes, for Jira it would look something like this: https://api.atlassian.com/ex/jira/{cloudId}/rest/api/3/project/{project_key}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.