How to list emails of organization members using delegation?

春会 刀 25 Reputation points
2023-03-06T18:30:22.08+00:00

I am using the delegation method, and authorized with the organization administrator account, the granted permissions are Mail.ReadBasic Mail.Read Mail.Read.Shared Mail.ReadWrite Mail.ReadWrite.Shared Mail.Send Mail.Send.Shared User.ReadBasic .All User.Read User.Read.All profile openid offline_access Calendars.Read DelegatedPermissionGrant.ReadWrite.All Directory.ReadWrite.All, however, after I get the token, I can only list the emails of the administrator, not the emails of the organization members ,what should I do?

Outlook | Windows | Classic Outlook for Windows | For business
Microsoft Security | Microsoft Graph
0 comments No comments
{count} votes

Accepted answer
  1. Andy David - MVP 157.8K Reputation points MVP Volunteer Moderator
    2023-03-06T18:47:44.12+00:00
    1 person found this answer helpful.
    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. CarlZhao-MSFT 46,376 Reputation points
    2023-03-07T02:45:54.67+00:00

    Hi @春会 刀

    You can list emails of other members of the organization in the application context.

    Before that, you need to grant the Mail.ReadBasic.All application permission to your app and grant admin consent, then use the daemon-based client credentials flow to obtain a token.

    Call the api endpoint in Postman to list emails of other members:

    User's image

    Hope this helps.

    If the reply is helpful, please click Accept Answer and kindly upvote it. If you have additional questions about this answer, please click Comment.

    1 person found this answer 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.