I have a strange requirement.
I have to first allow the user to register through the outlook email and allow the offline acces to their email using the oauth and then use these oauth token to read email from outlook/microsoft live using php from my web-application and store the data in the database. so is there any way to do this ?
it need to work well in all major browsers.
Thanks.
What you are after is a way to authenticate a Microsoft account with your server.
In doing so you can use Microsoft APIs to get emails and other data from the users account.
Here is a library for PHP which will guide you through the flow. https://github.com/stevenmaguire/oauth2-microsoft
You will need two things, first register an app with microsoft to get a
clientId
andclientSecret
, then in the flow make sure you request access to the users email with the following permissions.