Mohamed Sakher Sawan Mohamed Sakher Sawan - 7 months ago 23
C# Question

Where to get required information to access Azure ServiceBus via API, especiall ClientID and ClientSecret

I was trying to achieve the following scenario:
- Create a service bus queue via the API.
- Send a message to that queue.

Using C#.
If it was in AWS, I would need a couple of lines of code, and I need 3 pieces of information which are very easy to get, but it doesn't seem to be the case in Azure...

The pieces of information I realized that I need so far:
TenantId How to get the azure account tenant Id?

After hours of research, I was able to collect everything apart from the first two items, ClientId and ClientSecret, where I can get them?


Answer Source

You have to register your app in Azure AD to get your clientid & client secret.

Follow these steps to register in AAD. Note down the key (client secret) as it will not appear again anywhere.


  1. Login @ Azure portal
  2. Search 'Azure Active Directory' on top bar & open
  3. Go to 'App Registrations' & add your app
  4. Get the client id & add key (this is client secret)
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download