1

I have a NodeJS application that connects to Azure Service Bus, earlier we used to connect using shared access connection string, not sure how to connect it using Managed identity, there doesn't seem to be enough documentation available from Microsoft for Azure Service Bus for managed identity with NodeJS

Didn't find any relevant help

Edit 1

const defaultCredential = new DefaultAzureCredential();
      const fullyQualifiedNamespace = `${ServiceBusNamespace}.servicebus.windows.net`;
      this._sbAdminClient = new serviceBus.ServiceBusAdministrationClient(
        fullyQualifiedNamespace, defaultCredential
      );
      this._serviceBusClient = new serviceBus.ServiceBusClient(
        fullyQualifiedNamespace, defaultCredential
      );

Error

ManagedIdentityCredential - IMDS: Failed to retrieve IMDS token after 3 retries. | Error: AuthenticationError: ManagedIdentityCredential authentication failed. Status code: 404 More details: unknown_error Status code: 404 More details: An unknown error has occurred. Response body:

CoderAkki
  • 7
  • 4
  • Please check this: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicebus/service-bus/README.md#using-an-azure-active-directory-credential. – Gaurav Mantri Apr 25 '23 at 11:41
  • let me check this – CoderAkki Apr 25 '23 at 11:55
  • @GauravMantri got this error ManagedIdentityCredential - IMDS: Failed to retrieve IMDS token after 3 retries. | Error: AuthenticationError: ManagedIdentityCredential authentication failed. Status code: 404 More details: unknown_error Status code: 404 More details: An unknown error has occurred. Response body: – CoderAkki Apr 26 '23 at 10:55
  • Please edit your question and include all the details there only including the code instead of just posting the error message in comments. – Gaurav Mantri Apr 26 '23 at 10:56

0 Answers0