Graph Get Email

SSinhg 286 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 Authenticator
Microsoft Authenticator
A Microsoft app for iOS and Android devices that enables authentication with two-factor verification, phone sign-in, and code generation.
6,819 questions
Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
12,004 questions
{count} votes

Accepted answer
  1. Zehui Yao_MSFT 5,856 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 Answers by the question author, which helps users to know the answer solved the author's problem.