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.
837 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,265 questions
{count} votes

1 answer

Sort by: Most helpful
  1. YutongTie-MSFT 51,726 Reputation points
    2024-08-05T07:19:10.5433333+00:00

    Thanks for reaching out to us, we didn't hear from you. Please feel free to let us know if you need more help.

    Beside the example Meghana shared, there is another part from the document for sign-in card you may want to refer to - https://learn.microsoft.com/en-us/microsoftteams/platform/task-modules-and-cards/cards/cards-reference#sign-in-card

    I hope this helps. Please let us know if you have any other concern.

    Thanks,

    Yutong

    -Please kindly accept the answer if you feel helpful to support the community, thanks a lot.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.