Receiving 401 unauthorized while running Macro VBA which connects JIRA since last week

Sowndarya.R July 17, 2019

We have been using below snippet in Excel Macro VBA for connecting JIRA and pulling the details. But it is not working anymore and throwing below error.Please help.

Error:

Unauthorized (401)
 
Encountered a "401 - Unauthorized" error while loading this page.
 
Go to Jira home

Snippet:

weburl = "***************"

Dim objHTTP As New MSXML2.XMLHTTP

Dim strUserName As String
Dim strPassword As String
Dim stroutput As String

strUserName = "************"
strPassword = "***************"

strURL = weburl

objHTTP.Open "GET", weburl, False
objHTTP.setRequestHeader "Authorization", "Basic " & Base64Encode(strUserName & ":" & strPassword)

objHTTP.setRequestHeader "Content-Type", "text"
objHTTP.send "Nothing"
stroutput = objHTTP.responseText

1 answer

1 vote
Petr Vaníček
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.
July 17, 2019

Hi,

is it cloud Jira? If yes then Basic auth has been deprecated last year and few weeks ago deprecation peried ended and they start disabling this.

Look at this article: https://developer.atlassian.com/cloud/jira/platform/deprecation-notice-basic-auth-and-cookie-based-auth/

Sowndarya.R July 17, 2019

Hi,

 

Yes it is cloud JIRA, we tried with the API token but did not work and throwing below error. We are looking for an option to add the Token in Excel VBA Macro

HTTP Status 400 – Bad Request

Suggest an answer

Log in or Sign up to answer