I am trying to insert values into Azure Table PartitionKey Column. These values is of type String and have spaces between them. Example
$p = "VMWARE-42 3B"
$r = "VMWARE"
$entity = @{
"[email protected]" = "Edm.String";
"PartitionKey" = $p;
"[email protected]" = "Edm.String";
"RowKey" = $r;
}
Set-TableEntity -TableName $tableName -StorageAccountName $storageAccountName -StorageAccessKey $storageAccessKey -Entity $entity -Verbose
I am getting the below error:
Set-TableEntity - Attempt #0 VERBOSE: PUT https://table_url/tableName(PartitionKey='VMWARE-42 3B',RowKey='VMWARE') with -1-byte payload Error: Failed to update device entry Exception occurred: System.Net.WebException: The remote server returned an error: (403) Forbidden. at Microsoft.PowerShell.Commands.WebRequestPSCmdlet.GetResponse(WebRequest request) at Microsoft.PowerShell.Commands.WebRequestPSCmdlet.ProcessRecord()
Please any idea on how to solve this? Please note that when the values are inputed manually, there is no error. Does Azure Table accept spaces in String values? Please Note also that: without the space in the string value everything works as expected. the required table is updated.
Forbidden, are you using the correct credentials to that call?