IBM Sterling Transformation Extender

Sterling Transformation Extender

Come for answers, stay for best practices. All we're missing is you.

 View Only
  • 1.  Facing Issue while implementing Get call

    Posted Mon June 30, 2025 10:27 AM

    Hi All, I am facing issue while implementing Get call to fetch a secret from Azure Key Vault with Bearer Token

    Below is the command I have used., please suggest if any change needed.

    GET("HTTP","-TV -URL https://<keyvault>.vault.azure.net/secrets/<secret-name>?api-version=7.4 -METHOD GET", "Authorization: Bearer" + " " + "qwudkwu8skllll....")

    I am able to fetch the access token by another POST call but while fetching the secret, I'm getting below error, though the Bearer token is sent.

    AKV10000:Request is missing a Bearer or PoP token

    ITX Version : 11.0.1

    Best Regards

    Bhanu



    ------------------------------
    Bhanu Prakash
    ------------------------------


  • 2.  RE: Facing Issue while implementing Get call

    Posted Tue July 01, 2025 02:35 AM

    Looks like a couple of things could be wrong from my understanding:

    1) Call should be HTTPS

    2) Authentication: Bearer information should be passed using -HDR since it belongs in the header of the API call.

    IBM Help page for reference...

    https://www.ibm.com/docs/en/ste/11.0.1?topic=adapter-http-commands

    Also, make sure you have the http adapter patch that was released.  Also - it looks like you may have exposed some of your auth token in your post - so if you can edit that to XXXXXXXX or something you probably should,

    Hope this helps!  Happy mapping! 

    Lisa



    ------------------------------
    Lisa Edwards
    Software Engineer / Subject Matter Expert
    Rainbow Data Systems, Inc
    ------------------------------



  • 3.  RE: Facing Issue while implementing Get call

    Posted Wed July 02, 2025 11:39 AM
    Edited by Bhanu Prakash Wed July 02, 2025 12:20 PM

    Thankyou for your response Lisa.

    It's not actual auth token, it is random string I gave as example.

    I have tried using HTTPS in my command instead of HTTP, then the response is null. There is no failure message or keyvault response. 

    GET("HTTPS","-TV -METHOD GET -URL https://<keyvault>.vault.azure.net/secrets/<secret-name>?api-version=7.4  -HDR authorization: Bearer<<22>> 'xxxxxxxxxx....'  ")

    I have added -HDR and executed, still getting same error..

    {"error":{"code":"Unauthorized","message":"AKV10000: Request is missing a Bearer or PoP token."}} 

    Best Regards

    Bhanu



    ------------------------------
    Bhanu Prakash
    ------------------------------



  • 4.  RE: Facing Issue while implementing Get call

    Posted Thu July 03, 2025 06:54 AM

    Hi All,

    Now I have modified the command in the rule to use REST adapter instead of HTTP as given below and the error has changed.

    =GET("REST","-TV -METHOD GET -URL https://<keyvault>.vault.azure.net/secrets/<secret-name>?api-version=7.4  -H 'content-type=application/json authorization=<<22>>Bearer 'xxxxxxxxxxx'<<22>> ' ")

    Now, I am getting below error in m4rest.mtr file.

    {"error":{"code":"Unauthorized","message":"[BearerReadAccessTokenFailed] Error validating token: 'S2S12005'."}}

    And Exception log is as follows:

    Caught exception: com.hcl.hip.adapters.m4base.MBaseException

    Failed: (401) Unauthorized.

    com.hcl.hip.adapters.m4base.MBaseException: Failed: (401) Unauthorized.

                  at get.com.hcl.hip.adapters.m4rest.MAdapterImpl(MAdapterImpl.java:214)

                  at get.com.hcl.hip.tools.adapterdriver.MAdapterImpl(MAdapterImpl.java:131)

    Can someone suggest, what's going wrong? Trying to understand is this something to be fixed at ITX side or at Azure side while giving the access. 

    Best Regards

    Bhanu



    ------------------------------
    Bhanu Prakash
    ------------------------------



  • 5.  RE: Facing Issue while implementing Get call

    Posted Fri July 04, 2025 03:23 PM

    Hi All,

    Finally, the command is working after doing a lot of trail and error. Below is the working command.

    =GET("REST","-TV -METHOD GET -URL https://<keyvault>.vault.azure.net/secrets/<secret-name>?api-version=7.4  -H 'content-type=application/json authorization=<<22>>Bearer " +'xxxxxxxxxxx'+ "<<22>> ' ")

    Note: the position of single quote and double quotes has been changed.

    Best Regards

    Bhanu



    ------------------------------
    Bhanu Prakash
    ------------------------------