We are building a web-based, JavaScript Outlook Add-In which is required to call Microsoft Graph APIs to access the Outlook's user's emails and attachments.
The authentication process is being implemented using Single Sign-On (SSO) as outlined in the Microsoft documentation below:
Documentation Link
I am working on integrating the @azure/msal-node SDK into my application to write server-side code, specifically using the ConfidentialClientApplication class to implement the OAuth 2.0 On-Behalf-Of (OBO) flow. My goal is to acquire an access token (let's call it Token B) for accessing downstream APIs like Microsoft Graph by exchanging an existing token (Token A) from client-side code.
My Setup
NodeJS version: 20.12.2
SDK: @azure/msal-node
Class Used: msal.ConfidentialClientApplication
Function: acquireTokenOnBehalfOf
Questions:
- What Microsoft API is utilized internally by the acquireTokenOnBehalfOf method to fetch the token B?
- Is there any specific resources or documentation links that provide further insights into the OBO flow which helps me getting the Microsoft API used in "acquireTokenOnBehalfOf()" function?