How can I activate Basic Authentication on my Jira instance?
I am getting an error response: Basic auth with password is not allowed on this instance
Hello, basic authentication has been deprecated recently:
https://developer.atlassian.com/cloud/jira/platform/deprecation-notice-basic-auth-and-cookie-based-auth/
"update your app or integration to use API tokens, OAuth, or Atlassian Connect"
Hi, thank you for your quick response.
I created an api token, concatenated it with the email and encoded it to base64 and added as a header field. Can I still use this way to access Confluence?
I'm not 100% sure, but as far as I understand, token is created for the account to access any cloud products it has access to, so yes
Hi Enido,
Basic Auth still works on Confluence Cloud, but you have to use an Atlassian API Token as password and your Atlassian Id email as username.
You will get the error "Basic auth with password is not allowed on this instance" also if you provide a wrong username/password. This should be fixed by Atlassian to avoid confusion.
So try again with a valid Atlassian Id + API token.
Example:
GET https://<your-instance-name>.atlassian.net/wiki/rest/api/content/123123Content-Type: application/jsonAccept: application/jsonAuthorization: Basic yourBase64EncodedUsernameColonPassword
Good luck!
Hi @Lukas Gotter _ Meetical ,
On my side If I do a test with Insomnia :
It's work fine
But If I do the same test in VBA with MSXML2.XMLHTTP60 and I setRequestHeader "Authorization", "Basic " & sEncbase64Auth
I alway have an empty response while I use the same credential
Do you have any idea from the reason of this specific response on VBA ?
Below my VBA code:
Private Function UserPassBase64(text As String) As StringDim objXML As MSXML2.DOMDocument60Dim objNode As MSXML2.IXMLDOMElementDim arrData() As BytearrData = StrConv(text, vbFromUnicode)Set objXML = New MSXML2.DOMDocument60Set objNode = objXML.createElement("b64")objNode.DataType = "bin.base64"objNode.nodeTypedValue = arrDataUserPassBase64 = objNode.textEnd Function
Sub test()Dim JiraService As New MSXML2.XMLHTTP60Dim sUsername As VariantDim sPassword As VariantDim sRestAntwort As VariantDim sStatus As VariantDim sEncbase64Auth As VariantsUsername = "" 'Atlassian e-mail of your accountsPassword = "" 'Token generated by https://id.atlassian.com/manage/api-tokenssEncbase64Auth = UserPassBase64(sUsername & ":" & sPassword)With JiraService.Open "GET", "https://xxxxxxx.atlassian.net/rest/api/3/project", False.setRequestHeader "Content-Type", "application/json;charset=UTF-8".setRequestHeader "Accept", "application/json".setRequestHeader "Authorization", "Basic " & sEncbase64Auth.sendsRestAntwort = .responseTextsStatus = .Status & " | " & .statusTextDebug.Print "--------" & Now & "--------"Debug.Print sRestAntwortDebug.Print sStatusDebug.Print "--------" & Now & "--------"End WithEnd Sub
Result:
--------23/01/2020 16:52:02--------[]200 |--------23/01/2020 16:52:02--------
Awesome, it works.
@Stephane.arenas - interesting, because from what I understand in your VB code (wow, long time no see VB! ) - you get an empty json array as response. Are you sure you have the rights to browse projects? can you try another endpoint? can you reproduce the request with curl or something similar?
It looks like you're new here. Sign in or register to get started.