-
Notifications
You must be signed in to change notification settings - Fork 218
samples
The following samples illustrate web applications that sign in users. Some samples also demonstrate the application calling Microsoft Graph, or your own web API with the user's identity.
Language/
PlatformCode sample(s)
on GitHubAuth
librariesAuth flow ASP.NET Core
ASP.NET Core Series
• Sign in users
• Sign in users (B2C)
• Call Microsoft Graph
• Customize token cache
• Call Graph (multi-tenant)
• Call Azure REST APIs
• Protect web API
• Protect web API (B2C)
• Protect multi-tenant web API
• Use App Roles for access control
• Use Security Groups for access control
• Deploy to Azure Storage and App Service• MSAL.NET
• Microsoft.Identity.Web• OpenID connect
• Authorization code
• On-Behalf-OfBlazor Server
Blazor Server series
• Sign in users
• Sign in users (B2C)
• Call Microsoft Graph
• Call web API
• Call web API (B2C)MSAL.NET Authorization code ASP.NET Core Advanced Token Cache Scenarios • MSAL.NET
• Microsoft.Identity.WebOn-Behalf-Of (OBO) ASP.NET Core Use the Conditional Access auth context to perform step-up authentication • MSAL.NET
• Microsoft.Identity.WebAuthorization code
The following samples show how to protect a web API with the Microsoft identity platform, and how to call a downstream API from the web API.
Language/
PlatformCode sample(s)
on GitHubAuth
librariesAuth flow ASP.NET Call Microsoft Graph MSAL.NET On-Behalf-Of (OBO) ASP.NET Core Sign in users and call Microsoft Graph MSAL.NET On-Behalf-Of (OBO)
The following samples show an application that accesses the Microsoft Graph API with its own identity (with no user).
Language/
PlatformCode sample(s)
on GitHubAuth
librariesAuth flow .NET Core • Call Microsoft Graph
• Call web API
• Using managed identity and Azure key vaultMSAL.NET Client credentials grant ASP.NET Multi-tenant with Microsoft identity platform endpoint MSAL.NET Client credentials grant
Client credentials grant|
The following samples show how to configure your application to accept sign-ins from any Azure Active Directory (Azure AD) tenant. Configuring your application to be multi-tenant means that you can offer a Software as a Service (SaaS) application to many organizations, allowing their users to be able to sign-in to your application after providing consent.
Language/
PlatformCode sample(s)
on GitHubAuth
librariesAuth flow ASP.NET Core ASP.NET Core MVC web application calls Microsoft Graph API MSAL.NET OpenID connect ASP.NET Core ASP.NET Core MVC web application calls ASP.NET Core web API MSAL.NET Authorization code
- Home
- Why use Microsoft Identity Web?
- Web apps
- Web APIs
- Using certificates
- Minimal support for .NET FW Classic
- Logging
- Azure AD B2C limitations
- Samples
- Web apps
- Web app samples
- Web app template
- Call an API from a web app
- Managing incremental consent and conditional access
- Web app troubleshooting
- Deploy to App Services Linux containers or with proxies
- SameSite cookies
- Hybrid SPA
- Web APIs
- Web API samples
- Web API template
- Call an API from a web API
- Token Decryption
- Web API troubleshooting
- web API protected by ACLs instead of app roles
- gRPC apps
- Azure Functions
- Long running processes in web APIs
- Authorization policies
- Generic API
- Customization
- Logging
- Calling graph with specific scopes/tenant
- Multiple Authentication Schemes
- Utility classes
- Setting FIC+MSI
- Mixing web app and web API
- Deploying to Azure App Services
- Azure AD B2C issuer claim support
- Performance
- specify Microsoft Graph scopes and app-permissions
- Integrate with Azure App Services authentication
- Ajax calls and incremental consent and conditional access
- Back channel proxys
- Client capabilities