Share via

ADF error accessing webservice with security token

Graham Hewett 5 Reputation points
Apr 3, 2023, 10:50 AM

Error code: 2108: Error calling the endpoint 'https://csi10a.erpsl.eu1.inforcloudsuite.com'. Response status code: 'NA - Unknown'. More details: Exception message: 'NA - Unknown [ClientSideException] The format of value <token value>is invalid.'. Request didn't reach the server from the client.

The Web tool, is set to authentication None, Method Get, with Headers: "Authorization" value: <token value> which was obtained from a successful login to the same website. @{activity('CSI Login').output.Token}

If I add Bearer or Basic infront of the token then we dont get the error but the request fails:invalid token. I have tested the same token in Postman without any prefix and it works.

The token starts: b/XdI6IQzCviZOGJ0E+002DoKUFOPmVDkwpQDbQjm3w/qkdx.... and i believe ADF is trying to validate this as a url component and it fails. Is there any way to turn off this validation? or is there any other way of using this endpoint?

thanks

Graham

Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
11,305 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Graham Hewett 5 Reputation points
    Apr 17, 2023, 3:16 PM

    I have found a solution to this issue, but it is specific to the site i was accessing as there is an alternate path which let you log in a retrieve a Bearer Token and then you could access other endpoints as suggested by AnnuKumari-MSFT above by adding a Bearer prefix to the token.

    1 person found this answer helpful.

  2. AnnuKumari-MSFT 34,266 Reputation points Microsoft Employee
    Apr 4, 2023, 6:21 AM

    @Graham Hewett , Thankyou for using Microsoft Q&A platform and thanks for posting your question here. As per my understanding, you are trying to make a call to some endpoint and receiving an error "The format of value <token value>is invalid" where you are getting the token from the previous web activity . Please let me know if that is not the case. For better understanding, would you be able to share the screenshot of the syntax you are using to pass the token .

    The recommended syntax is : @{concat('Authorization: Bearer ', activity('CSI login').output.Token)} . This will convert the input string as : "Authorization: Bearer <AccessToken>"

    253735-image.png


    Hope it helps. For more assistance, kindly share your approach which you are trying . If this answers your question, kindly accept the answer by clicking on Accept answer button. Thakyou


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.