Im working through this guide using Azure Functions to commit IoTHub messages to Azure storage. I'm at section 5d, where I need to create a new Service Bus Connection string for my function, but whatever I use, including the format in the guide:
Endpoint=<Event Hub-compatible endpoint>;SharedAccessKeyName=iothubowner;SharedAccessKey=<Primary key>
I get the error:
Not a valid service bus connection string.
I’ve tried using the Event Hub-compatible endpoint
from my IoT hub endpoints and also the connection string –- primary key
from the access policy for iothubowner but again it rejects it.
I then created a new service bus and used that connection (see my answer below and initial optimism!) but when I tried to edit the function I get a 404 toast notification:
Function ($DeviceDataToStorage) Error: The listener for function 'Functions.DeviceDataToStorage' was unable to start. Microsoft.ServiceBus: The messaging entity 'Management operation failed. status-code: 404, status-description: The messaging entity 'sb://{MY SERVICE BUS CONNECTION STRING WHICH WAS ACCEPTED}/{EVENTHUBNAME}' could not be found..' could not be found.
Can anyone who has used Azure functions before advise what format this needs to be in or more importantly where exactly in the portal I can get this from?