If you've ever wanted to create an oAuth style application with Microsoft, you might have felt this pain before.
In true Enterprise Microsoft Fashion™, there's a lot going on.
This will be a bit long because of that. I hope I haven't missed anything (but I'm sure I have)!
We'll be using PHP (Laravel in my case).