【问题标题】:Office Addin not working in Word 2013Office 插件在 Word 2013 中不起作用
【发布时间】:2017-05-04 20:14:46
【问题描述】:

我创建了一个尝试提交到商店的 Office 插件,但由于插件需要在 Office 2013 中工作而被拒绝。我正在使用 ADAL 1.0.13 对 Microsoft Graph 和我在 AD 上托管的应用。

由于某种原因,当我从 Office 2013 登录 365 时,我无法获得 Microsoft Graph 的令牌,但我确实为我的应用程序获得了它。

当我检查本地存储时,图没有访问令牌

adal.token.renew.status5367d787-ea68-4352-a336-99d69dabc81d: Completed 
adal.token.renew.statushttps://graph.microsoft.com: In Progress

该插件适用于所有办公平台 Office365、Office 2016、IOS、MAC,Office 2013 除外。

任何想法肯定会有所帮助。

谢谢

这是我的 ADAL 日志

2017 年 5 月 4 日星期四 18:50:07 GMT:1.0.13-VERBOSE:位置更改事件从 https://wd365.azurewebsites.net/https://wd365.azurewebsites.net/

2017 年 5 月 4 日星期四 18:50:07 GMT:1.0.13-VERBOSE:位置更改事件从 https://wd365.azurewebsites.net/https://wd365.azurewebsites.net/#/user

2017 年 5 月 4 日星期四 18:50:07 GMT:1.0.13-VERBOSE:网址:/views/user.html 映射到资源:null

2017 年 5 月 4 日星期四 18:50:07 GMT:1.0.13-VERBOSE:网址:/apiServer 映射到资源:5367d787-ea68-4352-a336-99d69dabc81d

2017 年 5 月 4 日星期四 18:50:07 GMT:1.0.13-INFO:令牌可用于此 url /apiServer

2017 年 5 月 4 日星期四 18:50:07 GMT:1.0.13-VERBOSE:网址:https://graph.microsoft.com/v1.0/me 映射到资源:https://graph.microsoft.com

2017 年 5 月 4 日星期四 18:50:07 GMT:1.0.13-INFO:renewToken 被调用以获取资源:https://graph.microsoft.com

2017 年 5 月 4 日星期四 18:50:07 GMT:1.0.13-INFO:将 adal 框架添加到文档:adalRenewFramehttps://graph.microsoft.com

2017 年 5 月 4 日星期四 18:50:07 GMT:1.0.13-VERBOSE:更新令牌预期状态:a3ad9e34-cbd9-4e79-84f9-6065edd6b335|https://graph.microsoft.com

2017 年 5 月 4 日星期四 18:50:07 GMT:1.0.13-INFO:导航 url:https://login.microsoftonline.com/common/oauth2/authorize?response_type=token&client_id=5367d787-ea68-4352-a336-99d69dabc81d&resource=https%3A%2F%2Fgraph.microsoft.com&redirect_uri=https%3A%2F%2Fwd365.azurewebsites.net%2F&state=a3ad9e34-cbd9-4e79-84f9-6065edd6b335%7Chttps%3A%2F%2Fgraph.microsoft.com&client-request-id=0d76a714-62c9-45ca-af04-f548dd658f63&x-client-SKU=Js&x-client-Ver=1.0.13

2017 年 5 月 4 日星期四 18:50:07 GMT:1.0.13-VERBOSE:导航至:https://login.microsoftonline.com/common/oauth2/authorize?response_type=token&client_id=5367d787-ea68-4352-a336-99d69dabc81d&resource=https%3A%2F%2Fgraph.microsoft.com&redirect_uri=https%3A%2F%2Fwd365.azurewebsites.net%2F&state=a3ad9e34-cbd9-4e79-84f9-6065edd6b335%7Chttps%3A%2F%2Fgraph.microsoft.com&client-request-id=0d76a714-62c9-45ca-af04-f548dd658f63&x-client-SKU=Js&x-client-Ver=1.0.13&prompt=none&login_hint=oasmat%40worldox.com&domain_hint=worldox.com

2017 年 5 月 4 日星期四 18:50:07 GMT:1.0.13-VERBOSE:将加载状态设置为待处理:https://graph.microsoft.com

2017 年 5 月 4 日星期四 18:50:07 GMT:1.0.13-INFO: LoadFrame: adalRenewFramehttps://graph.microsoft.com

2017 年 5 月 4 日星期四 18:50:08 GMT:1.0.13-INFO:将 adal 框架添加到文档:adalRenewFramehttps://graph.microsoft.com

2017 年 5 月 4 日星期四 18:50:08 GMT:1.0.13-INFO: LoadFrame: adalRenewFramehttps://graph.microsoft.com

2017 年 5 月 4 日星期四 18:50:08 GMT:1.0.13-INFO:将 adal 框架添加到文档:adalRenewFramehttps://graph.microsoft.com

2017 年 5 月 4 日星期四 18:50:09 GMT:1.0.13-错误:获取资源令牌时出错:https://graph.microsoft.com 堆栈:未定义

2017 年 5 月 4 日星期四 18:50:09 GMT:1.0.13-INFO:响应中出现错误: { "method":"GET", "transformRequest":[null], "transformResponse":[null], "url":"https://graph.microsoft.com/v1.0/me", "headers": {"Accept":"application/json, text/plain,*/*"}, "data": "AADSTS50058: A silent sign-in request was sent but no user is signed in. The cookies used to represent the user's session were not sent in the request to Azure AD. This can happen if the user is using Internet Explorer or Edge, and the web app sending the silent sign-in request is in different IE security zone than the Azure AD endpoint (login.microsoftonline.com).
Trace ID: 1cacf014-8aa1-4cb9-981d-a6addb0d1700 Correlation ID: 0d76a714-62c9-45ca-af04-f548dd658f63 Timestamp: 2017-05-04 18:50:12Z|login_required|undefined" }

这是我的代码中的端点

var azureADConfig = {
    clientId: "5367d787-ea68-4352-a336-99d69dabc81d",
    endpoints: {
        'https://graph.microsoft.com': 'https://graph.microsoft.com',
        'https://wdwebauth.azurewebsites.net': '5367d787-ea68-4352-a336-99d69dabc81d'
    },
};

【问题讨论】:

    标签: microsoft-graph-api office-js adal office-addins


    【解决方案1】:

    根据错误消息,请求在尝试静默更新令牌时失败。

    请确保您之前已登录 Azure AD,并且 Web 浏览器不会阻止 cookie 发送。您的 Web 应用程序应与存在此问题的计算机上的 Azure AD 端点 (login.microsoftonline.com) 位于同一安全区域中。

    【讨论】:

    • 薛你有任何我可以遵循的文档,你如何从我的网络应用程序中更改安全区域以匹配 AD 的端点?为什么这仅发生在使用 IE11 在 Windows 7 上运行 Office 2013 客户端的计算机上?
    • 您可以通过在IE中打开该站点来检查站点的安全区域,然后我们可以通过Internet选项->安全来检查它。它将站点定位到特定区域。有关 URL 安全区域的更多详细信息,您可以参考this link
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-10-13
    • 1970-01-01
    • 2020-02-11
    • 1970-01-01
    相关资源
    最近更新 更多