azure - 我正在将 AddMicrosoftIdentityWebApi .net core 6 与 MSAL 结合使用。我可以创建自定义中间件吗?

标签 azure azure-active-directory azure-ad-msal azure-authentication azure-identity

我正在使用 AddMicrosoftIdentityWebApi .net core 6 。我可以创建自定义中间件吗?

下面是我的代码。

services.AddAuthentication(JwtBearerDefaults.AuthenticationScheme)
                
.AddMicrosoftIdentityWebApi(Configuration.GetSection("AzureAd"));

我们可以为 Microsoft 身份添加自定义中间件吗?

最佳答案

builder.Services.AddAuthentication(JwtBearerDefaults.AuthenticationScheme).AddMicrosoftIdentityWebApi(builder.Configuration.GetSection("AzureAd"));

关于azure - 我正在将 AddMicrosoftIdentityWebApi .net core 6 与 MSAL 结合使用。我可以创建自定义中间件吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/72269381/

相关文章:

azure - API 请求的正确范围是什么

azure - 从 Azure 功能调用 Azure Active Directory 密码重置策略

azure-active-directory - MSAL - userIdentifier 与 idToken.oid

azure - 使用 Azure AD 验证个人 MS 帐户时无法使用特定于租户的终结点

c# - 无法将 List<string> 从方法 1 传递到方法 2

azure - 错误 : Invalid configuration value detected for fs. azure.account.key

c# - Azure 发布 : Failed to update API in Azure

azure - ARM : The easiest way to recreate everything in a resource group into another RG in the same subscription?

azure - Microsoft Graph 无法通过源自本地 AD 并同步到 Azure 的 groups/delta 报告组成员身份增量

azure - 为什么我的应用程序要求未在 Azure AD 应用程序中配置的权限