OfficeDev / Office-Add-in-samples

Code samples for Office Add-in development on the Microsoft 365 platform.
MIT License
671 stars 756 forks source link

Consume getAuthContext for Outlook NAA sample and add logging #767

Closed codexeon closed 2 months ago

codexeon commented 2 months ago

Consome getAuthContext API in Outlook to help initialize MSAL.js (get loginHint, and filter to correct account in cache). Also implement loggerOptions behind a flag that can be used to help diagnose MSAL.js errors. The following line can be changed for additional logging: this.pca = await PublicClientNext.createPublicClientApplication(getMsalConfig(true))