Send Emails using office365 From a third application using Okta jwt token


We have an inhouse single page application with uses okta kpce flow for user authentication. This application needs to connect to our Office365 Server (We use okta for authentication there as well when we are logging from the web interface) to send some emails to external addresses. Our spa application uses advanced authentication to connect with O365 using locally stored credentials in order to get the security token and send the necessary mails. Can we use directly the token we got from okta in order to remove the second authentication process, since okta and o365 are already linked? Or if the flow does not work that way could you point me to the right direction? My main question is how will I be able to authenticate the user with okta and that what to use to authenticate again the same user to O365

I am currently facing the same situation as mentioned. Kindly update if you have made any progress.

From what I understand, Okta supports single sign-on for Office365 using SWA or WS-Fed.

I don’t see how you would be able to authenticate with Office365 using an OAuth/OIDC token from Okta.

Let me rephrase the question. Since the user has already authenticated himself for one application with okta can I somehow use the result of this authentication to send emails using an office365 instance that is also federated with okta? By ‘send email’ I mean a process connects to office365 sends the email on behalf of the user.