Finally, the command is working after doing a lot of trail and error. Below is the working command.
Original Message:
Sent: Thu July 03, 2025 06:53 AM
From: Bhanu Prakash
Subject: Facing Issue while implementing Get call
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
Original Message:
Sent: Wed July 02, 2025 11:39 AM
From: Bhanu Prakash
Subject: Facing Issue while implementing Get call
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
Original Message:
Sent: Tue July 01, 2025 02:34 AM
From: Lisa Edwards
Subject: Facing Issue while implementing Get call
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
Original Message:
Sent: Mon June 30, 2025 06:32 AM
From: Bhanu Prakash
Subject: Facing Issue while implementing Get call
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
------------------------------