4

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: ClientId

ClientSecret

ServiceBusConnectionString

ServiceBusNamespace

QueueName

ResourceGroupName

TenantId How to get the azure account tenant Id?

SubscriptionId

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

EDIT Which one is the client ID?

enter image description here

Thanks

Saw
  • 6,199
  • 11
  • 53
  • 104

1 Answers1

2

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.

Synopsis:

  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 (this is Application ID & NOT Object ID) & add key (this is client secret)
  • Which one is client id, there are a million different IDs :( – Saw Aug 19 '17 at 18:14
  • See the step 6 in first link – Arun Vinoth-Precog Tech - MVP Aug 19 '17 at 18:18
  • 1
    Don't you think that this is ridiculous from Microsoft? have you tried AWS? it is just consistent, they call things their names, I am really tired for 3 days trying to integrate with a simple service, with AWS, it has taken about half an hour from scratch. – Saw Aug 19 '17 at 18:20
  • I know, there's a lot to improve in MS side always.. :) – Arun Vinoth-Precog Tech - MVP Aug 19 '17 at 18:21
  • The funny thing is that I integrated with AWS SQS using C#, it was my very first time doing anything with message queues, it was super smooth, now after I learnt a lot of concepts, it is taking me that long to integrate with Microsoft's own Queue service, anyway. – Saw Aug 19 '17 at 18:22
  • 2
    Just to complete the joke, the link you provided is wrong, the Client ID is actually the Application ID and not the Object ID as mentioned, it worked finally. – Saw Aug 19 '17 at 19:46