Is it possible to obtain OAuth2 tokens for a Gmail account using Azure as the authentication platform?

Imanol112 16 Reputation points
2021-06-08T08:03:25.907+00:00

I asked this question here https://answers.microsoft.com/en-us/outlook_com/forum/oemail-oapps/is-it-possible-to-obtain-oauth2-tokens-for-a-gmail/9637269f-ea83-4c1a-a908-2a79ba9df726 but was suggested to ask it here as well.

According to this page: https://learn.microsoft.com/en-us/exchange/troubleshoot/administration/cannot-connect-mailbox-pop-imap-outlook

Outlook supports Modern authentication for only Exchange, Outlook.com, and Gmail at this time.

So, is it possible to register an app in Azure, ask for permissions like POP/IMAP and then obtain tokens so that the app can read a Gmail's account emails?

If so, please point me to the documentation where this is explained.

Thanks in advance.

Microsoft Security | Microsoft Entra | Microsoft Entra ID
0 comments No comments
{count} vote

1 answer

Sort by: Most helpful
  1. Ryan Hill 30,281 Reputation points Microsoft Employee Moderator
    2021-06-09T02:13:44.05+00:00

    Hi @Imanol112 ,

    The doc you're looking for is https://learn.microsoft.com/en-us/azure/app-service/overview-authentication-authorization. It gives you a broad overview of how to leverage the multiple providers to enable authentication and authorization. For Google in particular, see https://learn.microsoft.com/en-us/azure/app-service/configure-authentication-provider-google on how to configure your app service for Google sign-in.

    1 person found this answer helpful.
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.