【发布时间】:2022-02-18 11:59:51
【问题描述】:
我的 WebAPI 使用 Azure AD 保护
services.AddAuthentication(JwtBearerDefaults.AuthenticationScheme)
.AddMicrosoftIdentityWebApi(Configuration, "AzureAd");
...
"AzureAd": {
"Instance": "https://login.microsoftonline.com/",
"ClientId": "58ca819e-0e9b-4c72-9ae9-",
"TenantId": "3a0cf09b-2952-4673-9ace-"
},
...
[Authorize]
[ApiController]
[Route("[controller]")]
public class WeatherForecastController : ControllerBase
...
如何在后台从另一个 WebAPI 验证和访问这个 WebAPI?
【问题讨论】:
标签: asp.net-web-api azure-active-directory