简体   繁体   English

从Office 365单一登录到Asp.Net网站

[英]Single sign on from office 365 to Asp.Net website

We have an Office 365 portal and an Asp.Net web application for another purpose. 我们有一个Office 365门户和一个Asp.Net Web应用程序用于其他目的。 Web Application is using Forms Authentication using SQL Server database. Web应用程序正在使用SQL Server数据库进行表单身份验证。 On Office 365 portal, we want to provide a link which will redirect to Asp.NET web application, If the user is coming from Office 365 portal then the Asp.NET Web Application should not ask user credential. 在Office 365门户上,我们要提供一个链接,该链接将重定向到Asp.NET Web应用程序。如果用户来自Office 365门户,则Asp.NET Web应用程序不应询问用户凭据。 How can we achieve it? 我们如何实现呢?

Check for the access token provided by o365, if it a valid token, you can by pass the authentication in your asp.net web app. 检查o365提供的访问令牌,如果它是有效令牌,则可以通过asp.net Web应用程序中的身份验证。

The application has to use (ADAL) AD authentication library to check for the access token. 应用程序必须使用(ADAL)AD身份验证库来检查访问令牌。 here is a link for samples how to do this in asp.net: 这是示例链接,如何在asp.net中执行此操作:

https://msdn.microsoft.com/office/office365/HowTo/starter-projects-and-code-samples#bk_web https://msdn.microsoft.com/office/office365/HowTo/starter-projects-and-code-samples#bk_web

Hope this helps. 希望这可以帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM