I'm using below vba code to access jira rest api. When I try it manually after logging in through ie browser i'm able to get json response as below. But via vba code I'm getting error like
"The server name or Address could not be resolved"
Also while accessing jira url through ie for first time it requires to pass the credentials in my organization login page. will this code use the credentials which we are passing in code to login to this page(Mainly asking because it is my organization login page)?? Please help me in overcome this issue. Thanks in Advance!!!
JSON response:
{"self":"https://myurl/issues2/rest/api/latest/user?username=xxx","name":"xxx","loginInfo":{"loginCount":24,"previousLoginTime":"2018-07-13T04:52:47.821-0400"}}
VBA code:
## myurl,user,JIRA_PWD fields has to be modified while running the code
Dim oJiraAuth As MSXML2.ServerXMLHTTP60
Dim oJiraService As MSXML2.ServerXMLHTTP60
Set oJiraAuth = New MSXML2.ServerXMLHTTP60
With oJiraAuth
.Open "POST", "https://myurl/issues2/rest/auth/1/session", False
.setRequestHeader "Content-Type", "application/json"
.setRequestHeader "Accept", "application/json"
.send " {""username"" : """ & USER & """, ""password"" : """ & JIRA_PWD & """}"
sOutput = .responseText
sCookie = "JSESSIONID=" & Mid(sOutput, 42, 32) & "; Path=/Jira"
End With
Does anyone know how to use JIRA Personal Access Token in VBA for authorisation instead of user & password? Thanks in advance
Just curious about this old question.
Currently, I connect manually to the VPN, then I launch my script.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.