Skip to content

SSO - Support of regional Azure bots #367

@Benjiiim

Description

@Benjiiim

I'm not sure if I should open this one here or in the main teams-ai repo. Don't hesitate to tell me if I should do something else.

In Teams AI Library v1, we were able to use the ConfigurationBotFrameworkAuthenticationOptions to pass regional values for OAuthApiEndpoint and OAuthUrl settings (example: https://europe.api.botframework.com).

import { ConfigurationBotFrameworkAuthenticationOptions, ConfigurationServiceClientCredentialFactory } from "botbuilder";
import { TeamsAdapter } from "@microsoft/teams-ai";
import config from "./config";

let botFrameworkAuthConfig: ConfigurationBotFrameworkAuthenticationOptions = {
    BotOpenIdMetadata: "https://login.botframework.com/v1/.well-known/openidconfiguration",
    ValidateAuthority: true,
    OAuthApiEndpoint: config.oauthUrl,
    OAuthUrl: config.oauthUrl,
    ToChannelFromBotOAuthScope: "https://api.botframework.com",
    ToBotFromChannelOpenIdMetadataUrl: "https://login.botframework.com/v1/.well-known/openidconfiguration",
    ToBotFromEmulatorOpenIdMetadataUrl: "https://login.microsoftonline.com/botframework.com/v2.0/.well-known/openid-configuration",
    ToBotFromChannelTokenIssuer: "https://api.botframework.com",
    ToChannelFromBotLoginUrl: "https://login.microsoftonline.com/botframework.com",
    CallerId: "urn:botframework:azure"
  }

const adapter = new TeamsAdapter(
  botFrameworkAuthConfig,
  new ConfigurationServiceClientCredentialFactory(config)
);

export default adapter;

I don't find any way to do something similar with Teams AI Library v2 (OAuthSettings having only the defaultConnectionName property) and that seems to block the usage of regional Azure bots.

Is it possible to use regional Azure bots with Teams AI Library v2 today? If not, is it something planned?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions