Hi,
The access token is the Bearer token. For example, in your previous question I showed how to retrieve access token via IMDS. Once you have this access token, you can add it in the Authorization header in the request to management.azure.com REST API.
GET https://management.azure.com/subscriptions/<subscriptionId>/providers/Microsoft.ContainerInstance/containerGroups?api-version=2023-05-01
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6Ii1LSTNROW5OUjdiUm9meG1lWm9YcWJIWkdldyIsImtpZCI6Ii1LSTNROW5OUjdiUm9meG1lWm9YcWJIWkdldyJ9.eyJhdWQiOiJodHRwczovL21hbm
Curl command would be similar to below:
curl -v -s -H "Authorization: Bearer ${access_token}" -H "Content-Type: application/json" https://management.azure.com/subscriptions/${subscription_id}/providers/Microsoft.ContainerInstance/containerGroups?api-version=2023-05-01
Please click Accept Answer and upvote if the above was helpful.
Thanks.
-TP