I am trying to get response back from Azure management api in Data Factory for instance use this api (https://docs.microsoft.com/en-us/rest/api/resources/resource-groups/list) to get the resource group name in my pipeline. I am able to get the response back in Postman but not sure how to replicate it in Data Factory. I tried using the POST method by passing in the Client ID & Client Credentials like below and no luck. But, Not sure how to achieve this is Data Factory. What am I missing here.
$cmd = { .\curl.exe -X POST https://login.microsoftonline.com/common/oauth2/authorize -F grant_type=client_credentials -F resource=https://management.core.windows.net/ -F client_id=$client_id -F client_secret=$client_secret };
$responseToken = Invoke-Command -scriptblock $cmd;
$accessToken = (ConvertFrom-Json $responseToken).access_token;
(ConvertFrom-Json $responseToken)
Thank you.


