The right answer depends on your system, but you should be able to tell and explain how you know. Commonly, yes — most modern APIs use JWT access tokens, especially with identity providers such as Microsoft Entra ID, Auth0, Okta, Keycloak or ASP.NET Core custom token issuance. ID tokens in OpenID Connect are always JWTs. How to recognise a JWT - Three Base64URL-encoded parts separated by dots: header.payload.signature, usually starting with "eyJ" (the encoding of {"). - Decoding the header shows the algorithm and key ID: {"alg":"RS256","typ":"JWT","kid":"..."}. - The payload shows claims: iss, aud, sub, exp, scopes or roles. Tools like jwt.ms (Microsoft) or jwt.io decode it — never paste production tokens into untrusted sites. What else it could be - Opaque (reference) tokens: random strings with no readable content. The API must call the authorization server's introspection endpoint (or look the token up) to validate it. They are easy to revoke but add a network call. Some providers issue opaque tokens to clients and exchange them for JWTs at the gateway (the "phantom token" pattern). - Session cookies: with cookie authentication, the browser holds a cookie (for example an encrypted ASP.NET Core authentication cookie), not a JWT. - Microsoft personal-account (MSA) access tokens for Microsoft Graph may not be readable JWTs; clients should treat access tokens as opaque anyway. An important nuance: the client application should treat an access token as opaque — just store it and send it. Only the API that is the token's audience should parse and validate it. This lets the provider change token formats without breaking clients. Sample interview answer: "Yes, the access token is a JWT signed with RS256 by Entra ID. Our API validates it using the issuer's public keys from the OpenID configuration endpoint, checks audience and expiry, and reads roles from the 'roles' claim."
Ravindra Wadile · · 0 likes