2
votes

I have a MVC4 portal that needs the users to be authenticated by office 365 not SharePoint. users for different organizations will be authenticated by this portal. Just as https://login.microsoftonline.com/, regardless of your domain/organization is, when you enter your email address and password, office365 authenticate you and take you to your account or organization. I want to implement the same behavior in my portal. Can any body tell me the best way to do this?

I have tried the ACS (Azure Authentication) too but getting the error: Account '[email protected]' is not configured to sign-in to this application.

I have used the ws-metadata federation URL as: "https://login.windows.net/common/FederationMetadata/2007-06/FederationMetadata.xml"

But unable to get the desire result.

1
i have the same requirement, i want to use Office365 account to sign into my website. for example, click a button -> open a new window/tab which linked to login.microsoftonline.com -> o365 login successfully -> close o365 portal window -> return authorization code to my webpage.paul cheung
could you give me some ideas?paul cheung
It's called "Realm detection". Unfortunately that's as much as I know about the subject, but at least it should help when you google.Joel Coehoorn

1 Answers

0
votes

Wanted to comment but can't... For authentication you can use javax.mail 's PasswordAuthentication such as

 new Authenticator() {
                protected javax.mail.PasswordAuthentication getPasswordAuthentication() {
                    return new javax.mail.PasswordAuthentication(
                            cfg.getString("myEmail.user"),cfg.getString("myEmail.password") );
                }
            }

and for configuring office365 in for javax.mail may be this will help...