由于未经授权的 401,侧载 Outlook 添加失败

问题描述 投票:0回答:1

我正在尝试按照微软官方教程构建您的第一个插件来制作一个简单的插件。我按照说明进行了最后的详细操作,但我不断收到相同的错误。

运行 npm start 后出现错误,系统提示我使用我的 Microsoft 帐户登录,我这样做了。然后我在终端中得到这个:

Successfully registered package! (??)

STDERR:(×) 错误:[登录] 无法静默检索令牌。如果多次遇到此问题,可以删除

C:\Users\Benjamin Agic\.fx\account
并重试。 invalid_scope:70011 - [2024-02-16 15:41:20Z]:AADSTS70011:为输入参数“范围”提供的值无效。范围“https://dev.teams.microsoft.com/AppDefinitions.ReadWrite openid 配置文件offline_access”不存在。跟踪 ID:25aaa001-6ef9-467f-8d63-085a14dec900 相关 ID:a71e1aa8-fddb-4483-bbcd-af353a108f66 时间戳:2024-02-16 15:41:20Z - 相关 ID:a71e1aa8-fddb-4483- bbcd-af353a108f66 -跟踪 ID:25aaa001-6ef9-467f-8d63-085a14dec900 (×) 错误:侧载失败。 (×) 错误: {"statusCode":401,"message":"未经授权"} (×) 错误:m365.UnhandledError:执行 M365 任务时发生意外错误。 {"stack":"错误: {"message":"请求失败,状态代码 401","detail":"{\"statusCode\":401,\"message\":\"未经授权\"}", “tracingId”:“”} 在 createError (C:\Users\Benjamin Agic\Desktop\Plugin\Gist 的 git ode_modules\@microsoft eamsfx-cli\lib\index.js:14:300960) 解决(C:\Users\Benjamin Agic\Desktop\Plugin\Gist git ode_modules\@microsoft eamsfx-cli\lib\index.js:14:305240) 在 IncomingMessage.handleStreamEnd (C:\Users\Benjamin Agic\Desktop\Plugin\Gist 的 git ode_modules\@microsoft eamsfx-cli\lib\index.js:14:290544) 在 IncomingMessage.emit (节点:事件:530:35) 在 endReadableNT(节点:内部/流/可读:1696:12) 在 process.processTicksAndRejections (node:internal/process/task_queues:82:21)","message":"{"message":"请求失败,状态代码 401","detail":"{\"statusCode\": 401,\"消息\":\"未经授权\"}","tracingId":""}","config":{}}

我的电脑上有 Outlook,并且我已经签署了 Microsoft 帐户..这可能是什么潜在问题?

node.js npm outlook office365 sideloading
1个回答
0
投票

先决条件

您需要拥有有效的

Microsoft 365 Business Standard
Microsoft 365 Business Premium
订阅。请注意,您可以免费获得 1 个月

获取订阅时,系统会提示您创建一个

onmicrosoft.com
帐户。

因此,成功订阅

[email protected]
后,您将拥有两个帐户(注意,
alice
bob
mycompany
只是示例占位符名称):

正确的登录流程

在 Outlook 中,您需要使用

登录

在弹出窗口中,您需要使用

登录

登录程序不正确

如果您尝试在弹出窗口中使用

[email protected]
,您将收到未经授权的 401 错误

invalid_scope: 70011 - [2024-05-21 03:15:44Z]: AADSTS70011: The provided value for the input parameter 'scope' is not valid. The scope 'https://dev.teams.microsoft.com/AppDefinitions.ReadWrite openid profile offline_access' does not exist. Trace ID: [...] Correlation ID: [...] Timestamp: 2024-05-21 03:15:44Z - Correlation ID: [...] - Trace ID: [...]
(node:79101) [DEP0044] DeprecationWarning: The `util.isArray` API is deprecated. Please use `Array.isArray()` instead.
(✖) Error: Sideloading failed.
(✖) Error: {"statusCode":401,"message":"Unauthorized"}
(✖) Error: m365.InternalError: {"message":"Request failed with status code 401","detail":"{\"statusCode\":401,\"message\":\"Unauthorized\"}","tracingId":""}
© www.soinside.com 2019 - 2024. All rights reserved.