-
Notifications
You must be signed in to change notification settings - Fork 380
Description
I have an Extended MAPI application running as a Windows Service that connects to O365 mailboxes.
This application uses a pre-configured Outlook profile to log on to a mailbox.
The application runs fine until the tokens acquired by Outlook expire.
Since it runs as a service, there is no human that can run Outlook manually to refresh the tokens.
Now I have to modify this application to either acquire / refresh the Outlook tokens myself or to get / refresh tokens that enable my application to login to the mailbox using the Extended Outlook MAPI libraries.
How would I use MSAL to authenticate my application and refresh the token automatically before it expires?
I see samples on how to use MSAL to authenticate to make Graph calls, but I cannot understand how the acquired tokens would be used by my application / passed-on to the Outlook (Extended MAPI) libraries, as this is not Graph.
Since Outlook itself uses Extended MAPI as well, I wonder how it's done in Outlook?
I am completely new to MSAL and hope anyone can point me into the right direction or describe what needs to be done.
Thanks.