Search code examples
azureazure-resource-managerazure-data-lakeazure-stream-analyticsazure-iot-hub

sharedAccessPolicyKey of service bus from stream analytics job template in azure template.json


How to get the value of service bus sharedAccessPolicyKey to streamanalytics job without using event hub, in template.json deployment.

I am doing the following IOTHUB-->SAS-->SERVICEBUS-->LogicApp-->DLS flow. I am not using the Eventhub in my scenario.

Thanks, Sathiyarajan M


Solution

  • How to get the value of service bus sharedAccessPolicyKey to streamanalytics job without using event hub, in template.json deployment.

    Please try to use List Keys to get the key. The following code works fine on my side, please refer to it.

    "[listKeys(concat(resourceId('Microsoft.ServiceBus/namespaces', parameters('servicebusnamespacename')),'/AuthorizationRules/RootManageSharedAccessKey'), '2015-08-01').primaryKey]"
    

    enter image description here

    Note: as far as I know, the above code call this API to get the Keys.