Partly. Azure provides the identity platform that issues tokens, but your application still has to request, send and validate them correctly. Microsoft Entra ID (formerly Azure AD) as the token issuer - You register your API and client applications in Entra ID. The API "exposes" scopes or app roles; clients are granted permission to them. - Users sign in through Entra ID using OpenID Connect and OAuth 2.0. Entra ID issues ID tokens (who the user is) and access tokens (JWTs for your API, signed with Microsoft's keys), plus refresh tokens. - For consumer-facing apps, Microsoft Entra External ID (successor to Azure AD B2C for new projects) issues tokens for customer accounts, including social logins. Your application's responsibilities - Client side: use MSAL (msal-browser, MSAL Angular or React, MSAL.NET) to sign users in and acquire tokens silently; attach the access token to API calls. - API side: validate the tokens: builder.Services.AddAuthentication(JwtBearerDefaults.AuthenticationScheme) .AddMicrosoftIdentityWebApi(builder.Configuration.GetSection("AzureAd")); Microsoft.Identity.Web downloads Microsoft's signing keys, validates issuer, audience and lifetime, and maps claims (roles, scp). - Authorization: you still decide what each role or scope may do, and check resource ownership in your code. Machine-to-machine tokens - Managed identities let Azure services obtain tokens automatically for other Azure resources (Key Vault, SQL, Storage, or your own API) without secrets: DefaultAzureCredential requests them behind the scenes. - Client credentials flow for daemon apps outside Azure. Other Azure pieces - App Service Authentication ("Easy Auth") can handle sign-in at the platform level and pass identity headers to your app — handy for simple apps, less flexible for complex APIs. - API Management can validate JWTs at the gateway with the validate-jwt policy before requests reach your services. So the accurate answer: "Azure (Entra ID) issues and signs the tokens; we configure the app registrations, acquire tokens with MSAL, and validate them in our API with Microsoft.Identity.Web."
Ravindra Wadile · · 0 likes