Graph Get Email

SSinhg 316 Reputation points
2022-02-21T15:19:53.733+00:00

Hi,

Begineer's quesiton on Graph API

I am trying to get emails and attachment from O365

  • My admin has already registered the application.
  • Everyone within Org has read access
  • Can I generate token silently (by providing user id and pwd. later continue using it?)? or It should come from admin?

What is authProvider in this example, sample code below?

> GraphServiceClient graphClient = new GraphServiceClient( authProvider );

> 

> var messages = await graphClient.Me.Messages

>   .Request()

>   .GetAsync();

I have application id from azure portal, whatelse would I need to get this going
Apprecite any help on these lines.

Microsoft Security | Microsoft Authenticator
Microsoft Security | Microsoft Graph
{count} votes

Answer accepted by question author
  1. Zehui Yao_MSFT 5,881 Reputation points
    2022-02-22T02:28:59.427+00:00

    The microsoft identity platform supports the OAuth 2.0 Resource Owner Password Credentials(ROPC) grant, which allows an application to sign in the user by directly handling their password.

    176642-image.png

    Here is the documentation for your reference:
    https://learn.microsoft.com/en-us/azure/active-directory/develop/v2-oauth-ropc


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    2 people found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

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