I am trying to get the AML token using CLI. I am able to get the token using the command -> token=$(az account get-access-token --subscription {subscri ID} --resource-type arm --query accessToken --output tsv)
but when I use this token to get the AMLToken I get below error, however it is working fine if I make this query using postman : curl -d POST --header "Authorization: Bearer $token" "https://management.azure.com/subscriptions/{subcri id}/resourceGroups/{res_grup}/providers/Microsoft.MachineLearningServices/workspaces/{workspace}/onlineEndpoints/{endpoint}/token?api-version=2022-05-01"
the error which I get is below :
{ "error": { "code": "UnsupportedApiVersion", "message": "The HTTP resource that matches the request URI 'https://cert-eastus2.experiments.azureml.net/mferp/managementfrontend/subscriptions/{sub_id}/resourceGroups/{r_group}/providers/Microsoft.MachineLearningServices/workspaces/{workspace}/onlineEndpoints/{endpoint}/token' does not support the API version '2022-05-01'.", "innerError": null } }
any helps or pointers please, why I am getting this error? Not able to find any documentation for it.