in reply to Oauth2 authentication protocol for microsoft outlook.
I don't know anything about Microsoft Outlook, but since you're asking about OAuth2 authentication, have you looked at LWP::Authen::OAuth2? It may be a good starting point. There are several other OAuth2 packages on CPAN, if that one doesn't fit your needs.
When your only tool is a hammer, all problems look like your thumb.