Office365/OAuth2 sending emails for many accounts from one application

Customer Support 1 Reputation point
2022-09-27T07:54:34.097+00:00

I have an application written .net/c# which retreive/send emails for many customers mailbox using basic authentification.

In Octobre 2022, I have to use OAuth 2.0 to access to office365 mailbox.
I do it for one office365 account and everything work well.

But I don't want to configure all customer office365 account by creating an Azure Application fore each customer and use his secret/tenant id to send/retreive email.
I want to have one application which has the autorisation to access to all my customers account from different organization.

I don't find a suitable solution or the good configuration to authorize my application to access to customer mailboxes ? And is this is possible ?

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,716 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,309 questions
Exchange Server Development
Exchange Server Development
Exchange Server: A family of Microsoft client/server messaging and collaboration software.Development: The process of researching, productizing, and refining new or existing technologies.
516 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Glen Scales 4,431 Reputation points
    2022-09-28T23:51:03.88+00:00

    You can do it with a multi tenant application registration see https://learn.microsoft.com/en-us/azure/active-directory/develop/howto-convert-app-to-be-multi-tenant, each tenant will need to consent to your application individually.

    0 comments No comments