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.
Office365/OAuth2 sending emails for many accounts from one application
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 ?