Skip to main content
 首页 » 编程设计

c#之在 Web 应用程序中通过 Azure Active Directory 进行身份验证

2024年02月25日41arxive

我一直在关注 guide关于通过 Azure Active Directory 对我的 Web 应用程序进行身份验证。

我的任务只是在使用 Azure Active directory 登录后显示用户的全名和/或电子邮件。

我已经能够让它在本地运行并在 https://apps.dev.microsoft.com 中注册我的应用程序.但是,使一切适应应用服务上下文会破坏它。

我脑子里冒出一些问题。
1. Reply URL的本质是什么?
2. 我应该在 appsettings.json 中反射(reflect) Reply URL 吗?

请您参考如下方法:

What is the essence of the Reply URL?

对于 Web API 或 Web 应用程序,Reply URL 是 Azure AD 将向其发送身份验证响应的位置,如果身份验证成功,则包括 token 。详情请看here .

Should I reflect the Reply URL in the appsettings.json

对于本指南,您不需要在 appsettings.json 中使用它。您只需要替换appsettings.json中domain name,tenantid和clientid的值即可。

.