0

I have an error-handler passed to a service bus client "receive" function and it is firing after setup as follows:

  const ns = Namespace.createFromConnectionString(connectionString);
  const client = ns.createQueueClient(queueName);
  const receiver = client.getReceiver();
  receiver.receive(onMessageHandler, onErrorHandler, { autoComplete: false });

with the error: UnauthorizedError: Unauthorized access. 'Listen' claim(s) are required to perform this operation.

The connection string being used uses the default root shared access key which has all claims (listen, send AND manage). Why am I getting this error / how to fix it? Thx.

yen
  • 1,769
  • 2
  • 15
  • 43

1 Answers1

0

I don't know if this helps anyone but in my case, I had the old azure-sb package still kicking around, and it may have been polluting my node_modules in some in explicable way. Getting rid of it seems to have gotten rid of the claims complaints.

yen
  • 1,769
  • 2
  • 15
  • 43