How to configure API for SMTP Auth for shared e-mail on Microsoft 365

Brian Sump 6 Reputation points

Our company runs our e-mail through Microsoft 365. We have a shared e-mail that we would like to use for automated messaging, the equivalent of no-reply@keyman .com. I am attempting to follow the instructions here to implement this requirement. I am using OAuth v2 for authentication, and am trying to implement the SMTP Auth methodology.

Unfortunately, I am having problems in two respects:

  1. I am receiving an error ServerError: invalid_scope: 1002012 - [2022-03-11 20:04:47Z]: AADSTS1002012: The provided value for scope openid profile offline_access is not valid. Client credential flows must have a scope value with /.default suffixed to the resource identifier (application ID URI).

My scope is setup: const tokenScopes = ['']; This was setup from instruction found here. Maybe there is a problem with the permissions I've given my client, in which case when I do app registration, what permission do I need to ensure that my App has in order to be granted SMTP access?

  1. When I try to enable SMTP on my mail box following the instructions here, the mailbox doesn't have the referenced mail apps section, and instead there is a note that this is not an officially licensed account (because it is a shared account). Is there an alternate way to provide SMTP access to this account?

Any help would be appreciated.

Exchange Server Management
Exchange Server Management
Exchange Server: A family of Microsoft client/server messaging and collaboration software.Management: The act or process of organizing, handling, directing or controlling something.
7,416 questions
Microsoft 365 Publishing
Microsoft 365 Publishing
Microsoft 365: Formerly Office 365, is a line of subscription services offered by Microsoft which adds to and includes the Microsoft Office product line. Publishing: The process of preparing, producing, and releasing content for distribution or sale.
599 questions
0 comments No comments
{count} votes