我有一个需要由office 365而不是SharePoint对用户进行身份验证的MVC4门户。此门户将对不同组织的用户进行身份验证。就像https://login.microsoftonline.com/一样,无论您的域/组织是什么,当您输入电子邮件地址和密码时,office365都会验证您的身份并将您带到您的帐户或组织。我想在我的门户中实现相同的行为。有人能告诉我做这件事的最好方法吗?
我也尝试了ACS (Azure身份验证),但收到错误:帐户'Mytestaccount@Test2013.onmicrosoft.com‘未配置为登录到此应用程序。
我使用的ws元数据联合URL是:"https://login.windows.net/common/FederationMetadata/2007-06/FederationMetadata.xml“。
但是无法得到想要的结果。
发布于 2016-04-06 00:43:09
想要评论但是不能..。对于身份验证,您可以使用javax.mail的PasswordAuthentication,例如
new Authenticator() {
protected javax.mail.PasswordAuthentication getPasswordAuthentication() {
return new javax.mail.PasswordAuthentication(
cfg.getString("myEmail.user"),cfg.getString("myEmail.password") );
}
}对于在javax.mail中配置office365,this可能会有所帮助……
https://stackoverflow.com/questions/20632408
复制相似问题