How to call MSAL with the help of `Office.auth.getAuthContext()` response?
In Microsoft documentation for the Office.auth.getAuthContext()
method, it mentions:
"Gets information about the signed-in user. The add-in can pass this information to the Microsoft Authentication Library (MSAL.js) to get an access token for the current session."
When you call Office.auth.getAuthContext()
, it provides the following details:
{authorityBaseUrl:
"https://login.windows.net"`
authorityType: "aad"
loginHint: "suraj.sinha@xyz.com"
tenantId: "abcd"
userObjectId: "xyz"
userPrincipalName: "suraj.sinha@xyz.com" }
How can this response from Office.auth.getAuthContext()
be utilized in MSAL.js to acquire an access token?