Graph API Integration issue insufficient priviledge for outlook mail in dotnet .Any support will be highly appreciated

vis bharti 0 Reputation points
2023-03-16T11:54:21.2966667+00:00

I have created one console application .And on Azure i have created one app for organisation single tenant.Created Client Id and Secret .All permissions for mail i have given from both delegated and application tab. Since Requirement is to scan attachments from email and save in local folder.

Getting message

Code: Authorization_RequestDenied

Message: Insufficient privileges to complete the operation.

When checking token in jwt.io it is not showing all the scopes.

Scopes checked on azure active directory are the following

Those scopes are not visible when token i pasted on jwt.io

so denied access is showing. When scopes will be visible in token or is there any step that i have

missed?
Office365

Microsoft Graph Applications API
Microsoft Graph Applications API
A Microsoft API that enables you to manage these resources and actions related to applications in Azure Active Directory.
650 questions
Microsoft Graph Mail API
Microsoft Graph Mail API
A Microsoft API that supports accessing data in users' primary mailboxes and in shared mailboxes.
907 questions
Microsoft Graph SDK
Microsoft Graph SDK
A Microsoft software developer kit designed to simplify building high-quality, efficient, and resilient applications that access Microsoft Graph.
992 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Zehui Yao_MSFT 5,711 Reputation points
    2023-03-17T02:07:35.01+00:00

    Hi vis bharti I noticed that your Mail.Read permission is not granted, if you are using application permission, you need to grant permission in AD. Hope this helps. Best Wishes.

    User's image

    User's image


    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. Pollibondu 75 Reputation points
    2023-03-19T10:55:41.6966667+00:00

    Your idea is best

    0 comments No comments