逻辑应用程序 CosmosDb 存储过程连接器 returns 未经授权
Logic app CosmosDb Stored Procedure connector returns Unauthorized
我在我的 CosmosDb 数据库中创建了一个存储过程,用于删除基于 属性 的集合中的一些文件。数据库的结构如下所示:
Database Test
| - Collection
| - Documents
| - Stored Procedures
| - CleanupByProperty
然后我创建了一个执行此存储过程的逻辑应用程序。我使用 Read/Write 主键通过门户连接到 Cosmos 数据库。在 Logic App 中创建连接器时,它无法从我的数据库服务器读取集合,出现以下错误:
Could not retrieve values. The input authorization token can't serve the request. Please check that the expected payload is built as per the protocol, and check the key being used.
如果我手动填写 Collection ID
和 Sproc ID
以及 运行 逻辑应用程序的字段,它会在操作中返回 Unauthorized
。
我做错了什么?
是因为数据库名里有个space
修修补补一段时间后,我发现当我创建 完全相同的 场景时,但数据库名为 Database-Test
而不是 Database Test
,逻辑应用程序可以成功检索我的数据库的集合和存储过程,并且 运行 没有问题。
我不确定为什么会这样,因为根据 documentation,数据库名称可以包含以下内容:
Database names must contain from 1 through 255 characters, and they cannot contain /, \, #, ?, or a trailing space.
这意味着 Database Test
是一个有效的名称,确实如此(其他一切正常),但是我似乎无法使用我的逻辑应用程序连接到它。
问题已在 MSDN Forums 上提出,希望能获得有关发生这种情况的原因的更多信息。
Microsoft 的回复确认这是逻辑应用程序中的错误:
I have reproduced & validated this issue and reached out to product team. please stay tuned for updates.
UPDATE:
I have raised it internally with the PG and will provide the next update soon.
我在我的 CosmosDb 数据库中创建了一个存储过程,用于删除基于 属性 的集合中的一些文件。数据库的结构如下所示:
Database Test
| - Collection
| - Documents
| - Stored Procedures
| - CleanupByProperty
然后我创建了一个执行此存储过程的逻辑应用程序。我使用 Read/Write 主键通过门户连接到 Cosmos 数据库。在 Logic App 中创建连接器时,它无法从我的数据库服务器读取集合,出现以下错误:
Could not retrieve values. The input authorization token can't serve the request. Please check that the expected payload is built as per the protocol, and check the key being used.
如果我手动填写 Collection ID
和 Sproc ID
以及 运行 逻辑应用程序的字段,它会在操作中返回 Unauthorized
。
我做错了什么?
是因为数据库名里有个space
修修补补一段时间后,我发现当我创建 完全相同的 场景时,但数据库名为 Database-Test
而不是 Database Test
,逻辑应用程序可以成功检索我的数据库的集合和存储过程,并且 运行 没有问题。
我不确定为什么会这样,因为根据 documentation,数据库名称可以包含以下内容:
Database names must contain from 1 through 255 characters, and they cannot contain /, \, #, ?, or a trailing space.
这意味着 Database Test
是一个有效的名称,确实如此(其他一切正常),但是我似乎无法使用我的逻辑应用程序连接到它。
问题已在 MSDN Forums 上提出,希望能获得有关发生这种情况的原因的更多信息。
Microsoft 的回复确认这是逻辑应用程序中的错误:
I have reproduced & validated this issue and reached out to product team. please stay tuned for updates.
UPDATE:
I have raised it internally with the PG and will provide the next update soon.