Dear Heather,
read this under the assumption that you provide Smalltalk code which has to send a mail to somebody.
That means instead of opening a socket, sending a login and then the
mail, you must provide now something which handles the different
purposes and partners.
For short, I do not know OcEM. In what follows, I am not assuming anything about OcEM.
I also do not know the current rules enforced by Microsoft, being in the role of the ressource owner.
OAUTH2 is a protocol to add security. This means a change of the protocol and administrative preparations.
Instead of sending user/password to access the mail server and send mail, OAUTH2 establishes now roles and duties:
A client now must obtain a fresh access token which has to be provided in any request of this session - instead of having gained access initially and then sending further requests in the same session (without further access checks).
This access token also expires, e.g. in a lengthy session you have to be prepared to be able to reconnect by requiring a new access token.
Sending a mail reduces the session to perform a single request (although, in the worst case, the fresh access token might already be expired before its single use, hance even then you have to be able to reconnect).
So instead of sending a login/password expecting an acknowledge and then sending the mail you have to establish a session (might also be the same, sending a user/password), gain an access token and then to sending a request containing the access token and the mail to be sent.
This separation of authorization (addressing the authorization server) from sending requests (turning to the ressource server) requires you also to handle different target addresses to be used in the protocol (although the end point is fixed after being initally established).
Out of scope of OAUTH2, this may also place additional burden on you customers: depending on their required level of security the resource owner will provide adequate means. This is involved additional administration out of our scope (in this case a matter of the relation between
customers
and Microsoft).
So customers have (indirect) influence to design the complexity of obtaining the access token. As I said, I do not know current rules imposed by Microsoft here. May be that they do not make use of a client token in authentification.
The following is out of an experience with a required client token, where the login was secured by requiring the client to provide a client token, when sending a login. In such scenarios it is up to the resource owner to administrating this token. This allows e.g. to retract access in the case of loss/theft of a client machine.
Out of personal experience in establishing OAUTH2 (not for mail but in data exchange using SOAP) I recommend to reserve significant time to establish such a framework. This also stems from the involved encryption.
Also be prepared to provide tools to trace and check the protocols in testing.
Kind regards
Marcus