【问题标题】:Hello.js MSAL usage in Office Web Add-in IssueOffice Web 加载项问题中的 Hello.js MSAL 使用
【发布时间】:2019-12-23 15:13:13
【问题描述】:

我正在使用 hello.js for MSAL Microsoft Active Directory Library 来验证 Word Office Web 加载项的用户。它可以很好地返回到我原来的窗口。

这是我的基本设置

  1. 在 Word Web 插件中调用弹出对话框,然后在该弹出窗口中使用 loginRedirect 承诺函数。
  2. 效果很好!我使用我的 APPid 和租户 ID 进行身份验证。
  3. 一个观察结果是它需要一个 HTTPS 回复重定向 URL!!!!
  4. 但是,当它在成功登录后返回时,我的开发工具控制台中几乎没有错误
  5. 首先它找不到 html 元素,它返回 null 或 undefined
  6. 其次,当我单击 signIn() 并运行 loginRedirect 函数时,我看到了 Unable to get property 'then' of undefined or null reference
  7. 这个 hello.js 库来自https://github.com/AzureAD/microsoft-authentication-library-for-js

请告诉我为什么我在使用 var divWelcome = document.getElementById('WelcomeMessage'); 时得到 null 或 undefined ?

【问题讨论】:

  • 您好,我通过重构代码解决了这个问题。

标签: msal hello.js


【解决方案1】:

我通过重组代码和隔离问题解决了这个问题。出现阻止完整处理的错误。 MSAL Hello.js 库甚至适用于 Office 加载项!

【讨论】:

    猜你喜欢
    • 2020-05-16
    • 2013-01-22
    • 2019-05-24
    • 2020-03-08
    • 1970-01-01
    • 2018-11-14
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多