{"connections":[{"id":"msal-node","title":"MSAL Node (TypeScript)","kind":"sdk","language":"typescript","description":"Point MSAL at the emulator by overriding the Entra authority host.","template":"import { ConfidentialClientApplication } from \"@azure/msal-node\";\n\nconst app = new ConfidentialClientApplication({\n  auth: {\n    clientId: \"{{clientId}}\",\n    clientSecret: \"{{clientSecret}}\",\n    authority: \"{{baseUrl}}/common/v2.0\",\n  },\n});\n\nconst token = await app.acquireTokenByClientCredential({\n  scopes: [\"https://graph.microsoft.com/.default\"],\n});","body":"import { ConfidentialClientApplication } from \"@azure/msal-node\";\n\nconst app = new ConfidentialClientApplication({\n  auth: {\n    clientId: \"<client_id>\",\n    clientSecret: \"<client_secret>\",\n    authority: \"https://microsoft.your-instance.emulators.dev/common/v2.0\",\n  },\n});\n\nconst token = await app.acquireTokenByClientCredential({\n  scopes: [\"https://graph.microsoft.com/.default\"],\n});"},{"id":"graph-client","title":"Microsoft Graph client (fetch)","kind":"sdk","language":"typescript","description":"Call the Microsoft Graph subset with a bearer token from the emulator.","template":"const res = await fetch(\"{{baseUrl}}/v1.0/me/messages\", {\n  headers: { authorization: \"Bearer {{token}}\" },\n});\nconst messages = await res.json();","body":"const res = await fetch(\"https://microsoft.your-instance.emulators.dev/v1.0/me/messages\", {\n  headers: { authorization: \"Bearer <token>\" },\n});\nconst messages = await res.json();"},{"id":"ms-env","title":"Entra ID environment (env)","kind":"env","language":"bash","description":"Override the Entra authority and Graph base URLs to point at the emulator.","template":"AZURE_AUTHORITY_HOST={{baseUrl}}\nAZURE_TENANT_ID=common\nAZURE_CLIENT_ID={{clientId}}\nAZURE_CLIENT_SECRET={{clientSecret}}\nMICROSOFT_GRAPH_ENDPOINT={{baseUrl}}/v1.0","body":"AZURE_AUTHORITY_HOST=https://microsoft.your-instance.emulators.dev\nAZURE_TENANT_ID=common\nAZURE_CLIENT_ID=<client_id>\nAZURE_CLIENT_SECRET=<client_secret>\nMICROSOFT_GRAPH_ENDPOINT=https://microsoft.your-instance.emulators.dev/v1.0"},{"id":"curl-discovery","title":"curl (OIDC discovery)","kind":"curl","language":"bash","description":"Fetch the OpenID configuration the emulator serves.","template":"curl -s {{baseUrl}}/.well-known/openid-configuration","body":"curl -s https://microsoft.your-instance.emulators.dev/.well-known/openid-configuration"},{"id":"curl-graph-me","title":"curl (Graph /me)","kind":"curl","language":"bash","description":"Call Microsoft Graph /me with a delegated bearer token.","template":"curl -s {{baseUrl}}/v1.0/me -H \"authorization: Bearer {{token}}\"","body":"curl -s https://microsoft.your-instance.emulators.dev/v1.0/me -H \"authorization: Bearer <token>\""},{"id":"base-url","title":"Base URL (env)","kind":"env","language":"bash","description":"Point your SDK or app at the emulator instead of the real provider.","template":"{{SERVICE_UPPER}}_BASE_URL={{baseUrl}}","body":"MICROSOFT_BASE_URL=https://microsoft.your-instance.emulators.dev"},{"id":"create-credential","title":"Create a credential","kind":"curl","language":"bash","description":"Mint a working credential for this instance.","template":"curl -s -X POST {{controlBaseUrl}}/credentials \\\n  -H \"content-type: application/json\" \\\n  -d '{\"type\":\"{{defaultAuthType}}\"}'","body":"curl -s -X POST https://microsoft.your-instance.emulators.dev/_emulate/credentials \\\n  -H \"content-type: application/json\" \\\n  -d '{\"type\":\"oauth-authorization-code\"}'"},{"id":"inspect-ledger","title":"Inspect requests","kind":"curl","language":"bash","description":"Read the request ledger to validate how your app called the service.","template":"curl -s {{controlBaseUrl}}/ledger","body":"curl -s https://microsoft.your-instance.emulators.dev/_emulate/ledger"}]}