Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Http request "received HTTP status response: 401"

Steven Vits
Contributor
November 5, 2025

I'm trying to set up a http request in an automation rule.

  1. post action to 'https://login.microsoftonline.com/<TenentID>/oauth2/v2.0/token'
  2. creating var: Bearer {{webhookResponse.body.access_token}} seems succesfull
  3. get action to API with header 'Authorization' with var as a value is returning a 401 response
"Unable to publish the web request - received HTTP status response:
401
Error found in the HTTP body response:
{"error":{"code":"SecurityTokenInvalidSignature","message":"The provided authentication token is not valid, token signature is not properly formatted."}}"
This setup is working fine in postman but is refusing to work in JSM automation. 
Any ideas in what I am overseeing?

2 answers

0 votes
Marc -Devoteam-
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 5, 2025

Hi @Steven Vits 

As you are making a call to a Microsoft endpoint, this is providing the 401, not the automation rule in Jira.

So the authorization towards MS not working.

It also states this in the error "The provided authentication token is not valid, token signature is not properly formatted"

Check what authorization is needed at the MS side?

Also to get a token from MS, you first need to be logged in on the MS side, to get an oauth token.

The call you are making is not authorized, with the provided credentials in the post action.

 

Steven Vits
Contributor
November 5, 2025

@Marc -Devoteam- , thanks for the reply, the first pist action to Microsoft is succesfull and I do get a reply. Also using postman all is working like it should be.

the second http action should start a power automate flow with the auth token from tje app registration. 

0 votes
Charlie Misonne
Community Champion
November 5, 2025

Hi Steven,

Are you sure about the "webhookResponse" smart value? I know it exists for Jira Data Center but on Jira Cloud I always use "webResponse".

Here is what I have for the Authorization header.

Bearer {{webResponse.body.access_token}}

+ make sure you check this option on the call where you are requesting the token "Delay execution of subsequent rule actions until we've received a response for this web request"

Steven Vits
Contributor
November 5, 2025

@Charlie Misonne thank you for the suggestion. I will check this first thing tomorrow. As I do get a value in the var iI assumed this was correct. It seemed like a newline value JSM was adding to the bearer token.

will keep you posted.

Charlie Misonne
Community Champion
November 5, 2025

And is what you are getting in the variable the expected value?

I'm doing the same, also to trigger a PowerAutomate flow and I did not have to deal with any newlines in the response.

I'm not storing the token in a variable first. I use the smart value directly as Authorization header. Perhaps this can cause a difference.

Screenshot 2025-11-05 205120.png

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events