Assistance Required for Accessing Microsoft Graph API Delegated Permissions Without User Interaction

Naresh kumar 20 Reputation points
2024-09-27T05:46:58.1766667+00:00

Hi Guys,

Previously, we utilized a console application to access users' mail content within our application (registered as a confidential client in Azure Active Directory). However, we now require the ability to access Microsoft Graph API's delegated permissions to read a user's mail using only their email and password.

Our goal is to achieve this using a console application while meeting the following conditions:

1.Multi-Factor Authentication (MFA) is enabled.

2.No user interaction is required.

3.Admin consent is not necessary.

4.Hosted application should remain as Confidential client application

Could you kindly suggest an authentication method that would allow us to meet these requirements?

Thank you for your assistance.

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,545 questions
Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
11,943 questions
Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
21,585 questions
{count} votes

Accepted answer
  1. Yakun Huang-MSFT 4,555 Reputation points Microsoft Vendor
    2024-09-27T08:00:01.5333333+00:00

    Hi @Naresh kumar

    If you want to use a console application to access the Graph API, there are two ways to authenticate, but neither of them will meet your needs, so let me explain in detail below:

    1.Delegated (user) authentication: This authentication method uses delegated permissions, but requires the user to log in interactively for authorization.

    2.App-only authentication: This authentication mode uses the application permission and does not require the user to log in. However, the application permission can only be granted by the administrator.

    For detailed authentication methods and code for console applications, see this documentation.

    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.

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.