You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

使用-UseConnectedAccount向Azure存储表添加行时遇资源不存在错误

使用Azure AD认证(-UseConnectedAccount)操作Azure存储表时提示“指定资源不存在”错误

使用PowerShell通过-UseConnectedAccount上下文(而非密钥认证)向Azure存储表添加行时,触发如下错误:

MethodInvocationException: Exception calling "Execute" with "1" argument(s): "The specified resource does not exist."

对应的PowerShell脚本:

$StorageContext = New-AzStorageContext -StorageAccountName $StorageAccountName -UseConnectedAccount
$table = Get-AzStorageTable -Name $tableName -Context $storageContext
Add-AzTableRow -Table $table.CloudTable -PartitionKey "PartitionKey1" -RowKey "RowKey1" -Property @{"Property1"="Value1"}

已确认已分配Storage Table Contributor角色,改用.NET SDK方式操作时,仍出现相同错误:

Exception calling "Execute" with "1" argument(s):
"The specified resource does not exist."
Microsoft.Azure.Cosmos.Table.StorageException: The specified resource does not exist."

对应的脚本:

$StorageContext = New-AzStorageContext -StorageAccountName $StorageAccountName -UseConnectedAccount
$table = Get-AzStorageTable -Name $tableName -Context $storageContext
$entity = New-Object -TypeName Microsoft.Azure.Cosmos.Table.DynamicTableEntity -ArgumentList "PartitionKey1", "RowKey1"
$entity.Properties.Add("Property1", "Value1")
$table.CloudTable.Execute([Microsoft.Azure.Cosmos.Table.TableOperation]::InsertOrReplace($entity))

内容的提问来源于stack exchange,提问作者PUpskill

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.23 14:54:54