How to use the @azure/service-bus.ServiceBusClient.createFromAadTokenCredentials function in @azure/service-bus

To help you get started, we’ve selected a few @azure/service-bus examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Azure / azure-sdk-for-js / sdk / servicebus / service-bus / samples / typescript / gettingStarted / interactiveLogin.ts View on Github external
async function main(): Promise {
  const tokenCreds = await interactiveLogin({
    tokenAudience: "https://servicebus.azure.net/"
  });

  const sbClient = ServiceBusClient.createFromAadTokenCredentials(serviceBusEndpoint, tokenCreds);
  /*
   Refer to other samples, and place your code here
   to create queue clients, and send/receive messages
  */
  await sbClient.close();
}
github Azure / azure-sdk-for-js / sdk / servicebus / service-bus / samples / typescript / gettingStarted / servicePrincipalLogin.ts View on Github external
async function main(): Promise {
  const tokenCreds = await loginWithServicePrincipalSecret(clientId, clientSecret, tenantId, {
    tokenAudience: "https://servicebus.azure.net/"
  });

  const sbClient = ServiceBusClient.createFromAadTokenCredentials(serviceBusEndpoint, tokenCreds);
  /*
   Refer to other samples, and place your code here
   to create queue clients, and send/receive messages
  */
  await sbClient.close();
}
github Azure / azure-sdk-for-js / sdk / servicebus / service-bus / samples / javascript / gettingStarted / loginWithAzureAccount.js View on Github external
async function main() {
  const tokenCreds = await loginWithUsernamePassword(username, password, {
    tokenAudience: "https://servicebus.azure.net/"
  });

  const sbClient = ServiceBusClient.createFromAadTokenCredentials(serviceBusEndpoint, tokenCreds);
  /*
   Refer to other samples, and place your code here
   to create queue clients, and to send/receive messages
  */
  await sbClient.close();
}
github Azure / azure-sdk-for-js / sdk / servicebus / service-bus / samples / javascript / gettingStarted / interactiveLogin.js View on Github external
async function main() {
  const tokenCreds = await interactiveLogin({
    tokenAudience: "https://servicebus.azure.net/"
  });

  const sbClient = ServiceBusClient.createFromAadTokenCredentials(serviceBusEndpoint, tokenCreds);
  /*
   Refer to other samples, and place your code here
   to create queue clients, and send/receive messages
  */
  await sbClient.close();
}
github Azure / azure-sdk-for-js / sdk / servicebus / service-bus / samples / typescript / gettingStarted / loginWithAzureAccount.ts View on Github external
async function main(): Promise {
  const tokenCreds = await loginWithUsernamePassword(username, password, {
    tokenAudience: "https://servicebus.azure.net/"
  });

  const sbClient = ServiceBusClient.createFromAadTokenCredentials(serviceBusEndpoint, tokenCreds);
  /*
   Refer to other samples, and place your code here
   to create queue clients, and to send/receive messages
  */
  await sbClient.close();
}
github Azure / azure-sdk-for-js / sdk / servicebus / service-bus / samples / javascript / gettingStarted / servicePrincipalLogin.js View on Github external
async function main() {
  const tokenCreds = await loginWithServicePrincipalSecret(clientId, clientSecret, tenantId, {
    tokenAudience: "https://servicebus.azure.net/"
  });

  const sbClient = ServiceBusClient.createFromAadTokenCredentials(serviceBusEndpoint, tokenCreds);
  /*
   Refer to other samples, and place your code here
   to create queue clients, and send/receive messages
  */
  await sbClient.close();
}