How to trigger bot oauth flow from adaptive card?

G9000 5 Reputation points
2024-07-23T15:18:10+00:00

Hey is there any way to instantiate Oauth flow with the connection we made on bot framework from the adaptive card? Currently, I'm using these


 this.addDialog(
      new SsoOAuthPrompt(OAUTH_PROMPT, {
        connectionName: config.oauthConnectionName,
        text: "Please Sign In",
        title: "Sign In",
        timeout: 300000,
      }),
    );
    this.addDialog(new ConfirmPrompt(CONFIRM_PROMPT));
    this.addDialog(
      new WaterfallDialog(MAIN_WATERFALL_DIALOG, [
        this.promptStep.bind(this),
        this.loginStep.bind(this),
        this.displayEnsureOAuth.bind(this),
        this.displayToken.bind(this),
      ]),
    );

it works wonderfully but there's one issue I can't find a way to decorate the dialog to fit our use case.

I want to have (Please refer to the image) added as a notification card for on members added function.
The sign in button on the adaptive card should call the Oauth flow without having the bot to send a sign-in prompt again. It should start sign in process immediately. How can I achieve this?

スクリーンショット 2024-07-23 231122

Azure AI Bot Service
Azure AI Bot Service
An Azure service that provides an integrated environment for bot development.
806 questions
Microsoft Teams Development
Microsoft Teams Development
Microsoft Teams: A Microsoft customizable chat-based workspace.Development: The process of researching, productizing, and refining new or existing technologies.
3,064 questions
{count} votes