Account Id for Workflow Post Function

Hi, I’m trying to get the account id when a post function is triggered. The HTTP request just contains the user_id and user_key. The body of the trigger (which contains the postfunction id, issue, configuration and transition details) doesn’t have the account id either.

How I am meant to get this?

Thanks
Paul

2 Likes

Is your descriptor using the gdpr opt-in? Connect API migration

Hi Daniel, thanks for that but it looks like it changes the whole plugin over to use the account id. I’m in the process of converting users so I want all of the account ids but I still have to be able to handle usernames when I get them. With that change I would loose the ability to lookup usernames.

So I want the account id of the current user in post function but I need to process non-converted user.

Thanks
Paul

We also need the accountId as well as userkey/username in order to do migration (because we expose the webhook payload directly to customers for them to process in their scripts).

We can’t use the descriptor opt-in because it will remove the properties that customer’s scripts currently rely on.

We have the same issue: we need the accountId to be passed along to post-functions even without the GDPR opt in flag.
In general, we’re still waiting for Atlassian’s solution to workflow migration. We offered a solution that would be easy to implement for both Atlassian and vendors and would minimize migration issues on March 31st, but Atlassian had gone dark and is not communicating on GDPR migration anymore. I’m starting to feel that the deadline will be pushed back, as the cutoff date is fast approaching and everything is still far from ready.
Anyone from Atlassian would care to comment?

@paul, @jbevan, @david2, there are clearly some gaps in our developer documentation.

The triggered event of the Workflow Post Function module is a webhook.

The user_id and user_key query parameters for webhooks were deprecated with the recent user privacy API changes. Instead, the identity of the current user is provided in the JWT token. The user’s Atlassian Account ID has been added to the JWT context claim. In the new version of the API (available under opt-in), the context claim has been removed in favor of simply including the Atlassian Account ID as the JWT sub claim.

1 Like

Ahh I didn’t realise that. Ok thanks I’ll use that

Paul