jmeterazure-data-factoryazure-api-management

How to using the generated token to authenticate the ADF REST API


Just as my post ticket:

Authenticating to Azure application with JMeter

Now, I could generate the token from the Response body:

enter image description here

But when using the same way to test with ADF REST API directly:

Pipelines - Get

enter image description here

I got the error message:

{"error":{"code":"AuthenticationFailed","message":"Authentication failed. The 'Authorization' header is missing."}}

So, My question is how can I using the generated token to invoke the ADF REST API?


Solution

  • I have resolved this question by set the token as property by BeanShell Assertion, then using it by HTTP Header Manager in second thread:

    ${__setProperty(access_token, ${access_token})};
    

    enter image description here

    Then, use ${__property(access_token)} in the second thread to get it:

    enter image description here