Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ConnectorClient ProxySettings fail with ClientAuthError #4799

Open
ChupaCabre opened this issue Nov 21, 2024 · 0 comments
Open

ConnectorClient ProxySettings fail with ClientAuthError #4799

ChupaCabre opened this issue Nov 21, 2024 · 0 comments
Labels
bug Indicates an unexpected problem or an unintended behavior. needs-triage The issue has just been created and it has not been reviewed by the team.

Comments

@ChupaCabre
Copy link

ChupaCabre commented Nov 21, 2024

Github issues should be used for bugs and feature requests. Use Stack Overflow for general "how-to" questions.

Versions

What package version of the SDK are you using. 4.21.4
What nodejs version are you using 18.19.0
What browser version are you using
What os are you using

Describe the bug

Proxy settings are passed into Botframework ConnectorClient like so:

  const serviceUrl = 'https://smba.trafficmanager.net/teams/';
  const credentials = new MicrosoftAppCredentials(appId, appPassword);
  const clientOptions: ConnectorClientOptions = { baseUri: serviceUrl };
  clientOptions.proxySettings = {
    host: hostname,
    port: proxy_port,
    username: proxy_username,
    password: proxy_password,
  };
  const client = new ConnectorClient(credentials, clientOptions);

The client is then used to send a proactive message to Teams like so:

client.conversations.createConversation({
      bot: {
        id: appId,
        name: botty,
      },
      isGroup: true,
      channelData: {
        channel: { id: channelId },
      },
      activity: message,
    });

This results in the following error:

ClientAuthError: endpoints_resolution_error: Error: could not resolve endpoints. Please check network and try again. Detail: ClientConfigurationError: untrusted_authority: The provided authority is not a trusted authority. Please include this authority in the knownAuthorities config parameter.

To Reproduce

Steps to reproduce the behavior:

  1. Set up a proxy
  2. Create an Azure bot and enable teams channels
  3. set up a password in the azure bot. Grab the app id and app password
  4. upload a custom app to teams and specify the app id in the manifest
  5. create a node project that uses the above code to create a connector client, pass in the proxy details via proxysettings, and use the client to send a proactive message to Teams.

Expected behavior

message is sent successfully to Teams through the proxy.

Screenshots

If applicable, add screenshots to help explain your problem.

Related issue

AzureAD/microsoft-authentication-library-for-js#6527

@ChupaCabre ChupaCabre added bug Indicates an unexpected problem or an unintended behavior. needs-triage The issue has just been created and it has not been reviewed by the team. labels Nov 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Indicates an unexpected problem or an unintended behavior. needs-triage The issue has just been created and it has not been reviewed by the team.
Projects
None yet
Development

No branches or pull requests

1 participant