I have a POST to get Bearer token for Azure Commercial Resource Manager. I am trying to use variables as much as possible so that I can use the query across subscriptions, tenants, and environments. When I use a variable for the “resource” key, I get a Bearer token but the value for resource returned to me is a string of numbers instead of the value that I passed it. If I take the value I am storing inside the “INITIAL” field for the variable and hard code that into the resource key value, everything works as expected.
To Reproduce
Steps to reproduce the behavior:
- Create POST to https://{{aad_endpoint}}/{{tenant_Id}}/oauth2/token’ with the following keys:
- grant_type : client_credentials
- client_id : {{sp_client_Id}}
- client_secret : {{sp_client_Key}}
- resource : {{arm_Resource_Url}}
- Create the following variables:
- aad_endpoint : login.microsoftonline.com
- tenant_Id : <Azure_Tenant_ID>
- sp_client_Id : <Azure_application_ID>
- sp_client_Key : <Key_for_application>
- arm_Resource_Url : https://management.core.windows.net/
-
Execute POST
-
Replace resource key value with hard coded value and re-send POST
-
Token returned is correct but value not written to CURRENT:
Expected behavior
Expect resource value returned with token to reflect the resource that the token is for