Using Office 365 Portal Security Token for Authentication with custom website
When creating a lot of different web front-ends, it is always rather complex to get started with single sign-on or integrated login. The simple way to not maintain a credential database or passwords is to validate against a 3. party website. This is where the Office 365 Portal comes in handy, especially because many companies are already validating against or with it. I created this code as part of another solution, the example here has been cut down for demonstration purposes and easy integration. You will be able to validate against Portal.microsoftonline.com as long as the login is allowed for [...]