I use New-AzureSBAuthorizationRule to create a new Shared Access Policy for an Azure Service Bus Queue. See command below...
New-AzureSBAuthorizationRule -EntityName abcdef -EntityType Queue -Permission Listen -Name "abcdef_reader" -Namespace abcdefnamespace
But every time I run this I get the error below:
New-AzureSBAuthorizationRule : Object reference not set to an instance of an object.
At line:1 char:1
+ New-AzureSBAuthorizationRule -EntityName abcdef -EntityType Queue -Permission ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : CloseError: (:) [New-AzureSBAuthorizationRule], NullReferenceException
+ FullyQualifiedErrorId : Microsoft.WindowsAzure.Commands.ServiceBus.NewAzureSBAuthorizationRuleCommand
I am able to run New-AzureSBAuthorizationRule without issues if I drop EntityName and EntityType, i.e. creating policies for the Service Bus and not the Queue.
What am I doing wrong?