So we are in the same boat, need to use OAuth2 to allow customers to send emails via SMTP with Outlook 365...

I have the code (theoretically) working.

But the first test with customer failed, with the following message:

"User account 'laura@customerdomain.com' from identity provider https://sts.windows.net/{GUID}/' does not exist in tenant 'datatchag.com' and cannot access the application '{Our Application ID GUID in Azure}' (Datatech Accounting Software) in that tenant. The account needs to be added as an external user in the tenant first. Sign out and sign in again with a different Azure Active Directory user account."

To me this sounds like either:

1) Each customer has a different tenant ID in Outlook 365 and I need to submit a unique tenant ID for every customer instead of our tenant ID? I have verified that the supported account types is set to "Accounts in any organizational directory (Any Azure AD directory - Multitenant) and personal Microsoft accounts (e.g. Skype, Xbox)"

2) I've botched something else in the Application registration in Azure somehow (I'm following instructions on this page: https://learn.microsoft.com/en-us/az...t-register-app)

3) Something else?

There is this note showing on the Authentication blade of the App Registration page:

"Starting November 9th, 2020 end users will no longer be able to grant consent to newly registered multitenant apps without verified publishers.Add MPN ID to verify publisher"

Does anyone know if adding the MPN ID is a necessary step for getting this working? Thanks in advance!