API template library

Microsoft Entra ID mock API and live sandbox

A WireMock simulation of Microsoft Entra's REST API — covering tenant-scoped OIDC discovery, authorization, token grants, and the device-code flow.

Vendor
Microsoft Entra
Functionality
OIDC sign-in and token flows
Spec version
2.0.0
Endpoints
7
Stubs
10
Protocol
REST
Validation
AI-validated Before publication, an AI agent exercised these endpoints against the real Microsoft Entra API through WireMock's recording proxy, and the recorded traffic was used to verify each stub's request and response shapes.

Live sandbox · no signup, no API key

Microsoft Entra Mock

A running WireMock Cloud instance of this template, callable right now from a terminal, a script, or an AI agent.

Base URL
https://w2d21.wiremockapi.cloud

GET Landing page

curl -s -X GET 'https://w2d21.wiremockapi.cloud/'

GET OpenID Configuration

curl -s -X GET 'https://w2d21.wiremockapi.cloud/your-tenant/v2.0/.well-known/openid-configuration'

GET Login page (Authorize endpoint)

curl -s -X GET 'https://w2d21.wiremockapi.cloud/your-tenant/oauth2/v2.0/authorize'
Method Path Summary
GET /{tenant}/discovery/v2.0/keys JSON Web Key Set (JWKS)
GET /{tenant}/oauth2/v2.0/authorize Authorization Endpoint
POST /{tenant}/oauth2/v2.0/devicecode Device Authorization Endpoint
GET /{tenant}/oauth2/v2.0/logout End Session Endpoint
POST /{tenant}/oauth2/v2.0/token Token Endpoint
GET /{tenant}/v2.0/.well-known/openid-configuration OpenID Connect Discovery
GET /oidc/userinfo UserInfo Endpoint

Unauthenticated WireMock Cloud demo sandbox for Microsoft Entra — not an official Microsoft Entra sandbox, and it returns simulated example data only.

What's inside the Microsoft Entra template

Entra ID's defining quirk — every URL is scoped by a {tenant} path segment — is preserved throughout the template: use a GUID, or common, and discovery, authorization, and token routes all resolve under it. The discovery document is the anchor: request /{tenant}/v2.0/.well-known/openid-configuration and the stub returns tenant-scoped endpoint URLs pointing back into the mock, which is precisely what OIDC clients need to bootstrap themselves against it.

  • Tenant-scoped discovery — openid-configuration resolving per tenant, advertising the mock's own routes
  • Authorization — the v2.0 authorize endpoint that starts the code-with-PKCE flow
  • Token grants — the v2.0 token endpoint behind authorization-code and refresh exchanges
  • Device-code flow — devicecode responses complete with Microsoft's user-facing sign-in message
  • Keys & session — the tenant JWKS document, userinfo, and the end-session logout route

Frequently asked questions

Anything Entra itself would accept — common, organizations, or a directory GUID — since the mock matches the segment as a wildcard. Multi-tenant code that builds URLs per customer tenant can therefore run its real URL-construction logic unmodified.

An authorization-code exchange completes with placeholder credentials — no app registration, no secret, no admin consent. It's the inversion of real Entra setup, where a directory, a registered application, and granted permissions all precede the first successful token call.

No — policy enforcement is a directory-side behavior, and the mock has no directory. Flows resolve as if every policy passed. To rehearse blocked sign-ins or claims challenges, add stubs returning Entra's error contracts (interaction_required, for instance) in a WireMock Cloud copy.

The v2.0 endpoints cover the interactive authorization-code path with PKCE parameters accepted, refresh exchanges, and device-code sign-in. That spans the sign-in journeys of web apps, native clients, and input-constrained devices against one consistent tenant-scoped URL layout.

Vendor names identify APIs represented by WireMock template sources. This page does not imply vendor endorsement, certification, partnership, or official integration status.