An Azure service that provides a hybrid, multi-cloud management platform for APIs.
Hi @Naman Jain
Your JSON Structure looks correct. VS Code / MCP does not acquire tokens, it only sends headers. So, you must paste the Bearer token explicitly.
How You Get {access_token} (Outside VS Code)
Option 1: Using Postman (Recommended for Testing)
POST
https://login.microsoftonline.com/<tenant-id>/oauth2/v2.0/token
Body (x-www-form-urlencoded):
client_id=<client-id>
client_secret=<client-secret>
grant_type=client_credentials
scope=api://<api-app-id>/.default
Response:
{
"access_token": "xxxxxxxxxxxxxxx"
}
Option 2: Using Script (curl example)
curl -X POST https://login.microsoftonline.com/<tenant-id>/oauth2/v2.0/token \
-H "Content-Type: application/x-www-form-urlencoded
If the resolution was helpful, kindly take a moment to click on
and click on Yes for was this answer helpful. And, if you have any further query do let us know.