Reputation: 4776
Due to restrictions in the company I cannot use old azure portal. But I have a requirement to use ServiceBus in our project. I was able to create servicebus ns using resource.azure.com
, but I cannot find the way to get the connection string to that servicebus namespace.
I was trying to play around azure power shell, but it also requires access to old azure portal...
Thanks in advance.
Upvotes: 21
Views: 36031
Reputation: 15124
For those using Azure CLI this will do
az servicebus namespace authorization-rule keys list \
-g "<group>" \
--namespace-name "<namespace>" \
-n "RootManageSharedAccessKey" \
--query "primaryConnectionString" -o tsv
Upvotes: 7
Reputation: 701
Go to New Azure portal and get the Azure Service bus Connection string. Here I attached the image to follow up the instruction.
Upvotes: 61
Reputation: 121
On the portal Go to your service bus queue, -> Shared access policies -> RootManageSharedAccessKey -> On the pane that opens on the right, copy the Primary Connection string.
Upvotes: 10
Reputation: 11914
You can do this via powershell with the Azure Powershell Cmdlets.
You can find the installer for them via How to install and configure Azure PowerShell - see the link under Installing Azure PowerShell from WebPI.
Once installed:
Add the account first
Add-AzureAccount
Enter your credentials to connect to your Azure account
Select the specific subscription that you want to work with
Select-AzureSubscription -SubscriptionName "Your_Sub_Name"
List your Service Bus namespaces
Get-AzureSBNamespace
All your namespaces, along with the connection string (for RootManageSharedAccessKey
) will be listed.
(Optional) If you have specific shared access key names that you've created, you can get them like this:
Get-AzureSBAuthorizationRule -Namespace your_namespace
The namespace
will be the name listed in the output from step 3
Upvotes: 4