I can successfully create a Shared Access Policy on the SB Namespace with PowerShell using:
New-AzureSBAuthorizationRule -Name "MyEHListenRule" -Namespace $AzureSBNameSpace -Permission Listen
However, when attempting to set a Shared Access Policy on a SB Queue according to this MSDN article using:
New-AzureSBAuthorizationRule -Name "Manage" -Namespace $AzureSBNameSpace -Permission $("Manage", "Listen", "Send") -EntityName $QName -EntityType Queue
Where:
[string]$AzureSBNameSpace = ronboksbeh
[string]$QName =ronbokq0
PowerShell returns:
New-AzureSBAuthorizationRule : Object reference not set to an instance of an object.
At line:1 char:1
+ New-AzureSBAuthorizationRule -Name "MyRule" -Namespace $AzureSBNameSpace -Permis ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : CloseError: (:) [New-AzureSBAuthorizationRule], NullReferenceException
+ FullyQualifiedErrorId : Microsoft.WindowsAzure.Commands.ServiceBus.NewAzureSBAuthorizationRuleCommand
Additionally there was a previous question about this cmdlet not working back in December 2014 and this question has still gone unanswered.
I am still struggling with this, so if anyone has ever gotten this cmdlet to work and could shed some light on what we might be doing incorrectly it would be greatly appreciated.